Does anyone know how to check if a netsuite date f...
# advancedpdf
j
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
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
Something like .now?date?string.DD?number - 1 should do the job for you
m
Won't work on the first of the month, and will give false positives for a month and a day ago etc.
n
@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
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.
netsuite 1
n
By "sketchy" you mean "No" support at all. 😛