calculating a records age
Hi I'm trying to calculate a record's age in hours, and the output doesn't make sense to me, am I missing something?
here's the code:
- info "the date-time now is " + now ;
- for each offer in offerslist
- {
- bday = offer.get("Created_Time");
- info bday;
- rn = now;
- ageinhours = hoursBetween(bday, rn);
- info ageinhours;
- }
and the output is:
the date-time now is 28-Aug-2022 16:01:28
2022-08-29T01:35:26+03:00
-7
2022-08-28T19:44:27+03:00
16
I get why the first age is a minus, but they both still don't add up(there are 9 hours between the first one and now, and 3 hours between the second one)
Thanks in advance:)