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