aerinw's Profile
Rookie
3
Points
3
Points
Questions
0
Answers
1
-
You can test this out by just using the console in your browser. The values of two NS date/time fields can be parsed by a javascript date object. The result of subtracting two date objects comes out in milliseconds and you can divide to get the hours.
var testDate1 = new Date(); // for me this is Fri Feb 19 2021 09:10:50 GMT-0800 (Pacific Standard Time) var testDate2 = new Date('2/18/2021'); //Thu Feb 18 2021 00:00:00 GMT-0800 (Pacific Standard Time) var diff = testDate2 - testDate1; //119450971 var diffHrs = diff / 1000 / 60 /60; //33.18082527777778- 1809 views
- 1 answers
- 0 votes