Get the date difference in "DAY" and "MINUTE" | Freemarker & Synesty Studio

Viewed 40

I want the date difference between to dates dipslayed in days and also minutes. The problem is that the function:

${datediff(datetime_1, datetime_2, "DAY")}

will obviously only give me the difference in days back. Putting after the "DAY" for example a && "MINUTE" will not work.

Is there a solution to this question or any workaround ?

1 Answers

Datediff with parameter "minute" would give you minutes and since every 1440(24hour*60minutes/hour) minute is a day you can divide by 1440 to get the day, modulo by 1440 to get remainder "minutes"

Related