Time and Date Functions

format()

The format functions formats a number (first parameter) according to a time format (second parameter). Example:

format(123.45; "h:mm:ss,k") - returns 0:02:03,4

date()

date() returns the current date for calculations:

[Event.Date]-[Date]  - returns the number of days to the date of the event

date(a) returns the current date formatted according to a:

date("dd/mm/yyyy") - returns for example 01/07/2014

date(a;b) returns the date b formatted according to a:

date("mm/yyyy"; [DateOfBirth]) - could return for example 05/1970

the function can be used to also extract dates / times from a datetime string such as the [Created] or [Modified] fields. 

Date Formats:

d Day of Month (without leading zeroes)
dd Day of Month (with leading zeroes)
ddd Day of Month as Ordinal value
m Month (without leading zeroes)
mm Month (with leading zeroes)
mmm Month as short text (English & German only)
mmmm Month as long text (English & German only)
yy 2-digit Year
yyyy 4-digit Year
e Day of Week as number (1-7)
ee

Day of Week as short text (English & German only)

eee Day of Week as long text (English & German only)
a Day of Year
ww Week number
isoweek

Year and Week number

unix Unix time

Time Formats:

hh Hours
nn Minutes
ss Seconds

now()

now() returns the current date and time for calculations:

now()-[Created]  - returns the number of days ago the participant has been created.

ElapsedTime()

ElapsedTime(time; format) creates a special string which generates a running time on lists, showing the time elapsed since time.

If format is not given, the default format HH:mm:ss will be used.

If the format starts with a ”-” (e.g. "-HH:mm:ss"), it will show a countdown to time, followed by the elapsed time from time.
If the format starts with a ”+” (e.g. "+HH:mm:ss"), it will also show a countdown to time, but the elapsed time after time will be prefixed with a plus sign.
If no sign is given, the output will simply start showing the elapsed time from time, without any countdown or sign prefix.

Note that ElapsedTime will not work for multi-day events where the time exceeds 24 hours.

AgeOnDate()

AgeOnDate(yyyy;mm;dd) returns a participant's age on a specified date entered with 3 parameters; year month and day..