Back
timeAgoInWords()
1. Example in a controller (outputs: "3 months")
aWhileAgo = DateAdd("d", -90, Now());
timeAgoInWords(aWhileAgo)
2. Including seconds (outputs: "less than 5 seconds")
timeAgoInWords(DateAdd("s", -3, Now()), includeSeconds=true)
3. Comparing two specific dates (Outputs: "5 months")
past = CreateDateTime(2024, 01, 01, 12, 0, 0);
future = CreateDateTime(2024, 06, 01, 12, 0, 0);
timeAgoInWords(fromTime=past, toTime=future)
Copied!