How can a Saved Search return difference in Time between Now and Last Modified Date
I am attempting to get the difference in Time (Hours) between two dates.
I am running a Transaction Search with a Formula(Numeric) result as defined by
With a Now of 3/2/2022 3:28pm and a Last Modified Date of 3/2/2022 3:12pm I am getting a value of
Meanwhile if I were to run the equivalent code in the console I get.
var then = new Date('2022/03/03 12:00'); console.log(then); var now = new Date('2022/03/03 12:15'); console.log(now); console.log(now-then); console.log((now-then)/1000/60/60);
Wed Mar 02 2022 12:00:00 GMT-0700 (Mountain Standard Time) Wed Mar 02 2022 12:15:00 GMT-0700 (Mountain Standard Time) 900000 0.25
I do not understand the difference or what I am doing wrong in order to get such a strange result from NetSuite.