Does anyone know how to show the diff of two date ...
# suitescript
t
Does anyone know how to show the diff of two date fields in an email template? (Freemarker)
n
Try using: (myDate?long - 1000 * 60 * 60 * 24 * daysBefore)?numberToDate
t
Not sure what this returns. Thanks for the response @Nik
n
Here myDate is the Date you want to subtract some days from. And days before are the number of Days you wanna subtract. I know you wanna subtract two dates instead but I think this would give you a start. Alternately, you could use record.trandate?date?string.MM?number record.trandate?date?string.DD?number record.trandate?date?string.YYYY?number to get these values and write custom logic to subtract these days. You can get these written in other languages(javascript/C#) and use them as sample to write your own code.