The DATE function takes Numbers describing a year, month, and day; it uses these to create a DATE, which it returns.

 This function requires three Numbers as input. It outputs a Date with the given numbers used as the year, month, and day values. 

Declaration

DATE(year, month, day) -> date

 

Parameters

year (required, type: Number)
A 4-digit integer; this represents a 4-digit year.
month (required, type: Number)
An integer between 1 and 12; this represents the month of a 12-month year.
day (required, type: Number)
An integer between 1 and 31, representing the day of 31- (or 30-, or 29- or 28-) day year.

Return Values

date (type: Date)
A Date with the year, month, and day values specified by the given Numbers.

Examples

The following example returns a Date indicating February first, 2000:

DATE(1, 2, 2000) -> {
"day": 1
"month": 2
"year": 2000
}

 

Was this article helpful?

0 out of 0 found this helpful