I have two date values.
These are stored in two variables.
bookingDate
dateToday
bookingDate has a value of 06/04/2023
dateToday is set with the below script:
[[ Now.toLocaleDateString(“en-GB”) ]]
This is set, to something like 04/11/2022
On load of a text field, I do the below calculation, to set its text but it just returns NaN.
[[ Date.parse(bookingDate)/86400000 - Date.parse(dateToday)/86400000 + 1]]
I want it to return the difference of days, between the dates. I’ll also want to do something similar to show hours and minutes.