date

To convert to or return a date value

This function extracts the date from a timestamp. It also returns a date based on the numeric values for year, month, and day.

‌If you specify "0" as the value for the day, the last day of the previous month will return. This is a very handy way, to determine the last day of a month.

‌Furthermore, a Unix time specification in milliseconds can be converted into a date.

Syntax

date(any)

date(number, number, number)

Return

‌date

Examples

Your result format may be different depending on your settings.

date(year, month, day) To return a date value.

date(2021, 8, 0)

Result: 07/31/2021 (US) (last day of the previous month)

date(myTimeValue) To convert a given time-related value to a date value. If the value is a number, it represents the Unix time in milliseconds.

date('Date + Time')

Result: Date from the field Date + Time

date(start(Appointment))

Result: Date of the start of the Appointment field

date(1617873118285)

Result: 04/08/2021 (US)

‌See also

time, which returns the current time.

Last updated