Forum Discussion
dmiller
9 years agoFormer Employee
See also this thread How to obtain difference btw 2 timestamp?
Surendar
9 years agoContributor
Yes I have found the solution using the getTime() but its limited to date-time datatype. If suppose the datatype may vary facing undefined getTime issue for local-date-time and etc.
date difference:
Math.floor(($date1.getTime() - $date2.getTime() ) / (1000 * 60 * 60 * 24))
- dmiller9 years agoFormer Employee
I checked with Dev and historically we’ve seen people format the local time into a string and then do Date.parse().