@peternlewis, you have given us a rich selection of date tools in KM. I'd like to request that you add a function to calculate the difference between two dates. AFAIK, it does not exist.
This can be done fairly easy using JavaScript for Automation (JXA), but it would be very helpful, especially to those who aren't comfortable with scripting. I'd suggest something like this:
function DateDifference (pDate1, pDate2, pUnits)
where
DateDifference = pDate2 - pDate1
pUnits = choiceOf: Sec, Min, Hrs, Days, Yrs, or standard format of Yrs:Days:Hrs:Min:Sec
pDate1 & pDate2 formats supported: ISO, English/Australian, American
Of course that is just a suggestion of what I think would be useful. You and others may certainly have different ideas.
Thanks.
From the wiki:
Current Date/Time Functions and Calculations
Here are some other date/time related tokens and functions:
[Editor: Plan to put in table with descriptions]
-
NOW() (function) (unixtime)
-
TIME() (function) (unixtime)
-
%LongDate% (token) (local)
-
%LongTime% (token) (local)
-
%NumberDate% (token) (local)
-
%ShortDate% (token) (local)
-
%ShortTime% (token) (local)
-
unixtime in GMT