Does anyone know how to check if a netsuite date field is equal to yesterday inside a template? I cant figure out how to subtract a day from ".now". I know that i can get the current date in milliseconds, but can i also get the milliseconds of the netsuite date?
n
Nik
01/08/2019, 6:25 AM
Something I was using :
${statement.trandate?date?string.YYYY?number-1}
you can replace YYYY with DD and should do the job for you I think
Nik
01/08/2019, 6:27 AM
Something like
.now?date?string.DD?number - 1
should do the job for you
m
michoel
01/08/2019, 7:59 AM
Won't work on the first of the month, and will give false positives for a month and a day ago etc.
n
Nik
01/08/2019, 9:35 AM
@michoel That was just to give the man an idea of how he can tackle. That's why it must be used with MM and YYYY all along. This will be like re-inventing the wheel but only for advancedpdf(s). 😶
j
JR
01/08/2019, 2:56 PM
thanks guys, much appreciated. I'm trying to set a status field i created on the record instead. This way i can read it easily in the template and not worry about the "sketchy" date support in Freemarker.