This function returns the DateTime object for a particular date, specified by the year, month, and day.

Syntax

DATE(year,month,day)

Arguments

This function has these arguments:

Argument |
Description |

year |
Number representing the year, from 1 to 9999, using four digits; if not integer, number is truncated |

month |
Number representing the month of the year; if not integer, number is truncated |

day |
Number representing the day of the month; if not integer, number is truncated |

If month is greater than 12, then month increments by the number of months over 12 and the year advances, if needed. For example, DATE(2003,16,2) returns the DateTime object representing April 2, 2004.

If day is greater than the number of days in the specified month, then day increments that number of days from the first day of the next month. For example, DATE(2004,1,35) returns the DateTime object representing February 4, 2004.

If values for the arguments are not integers, any decimal places are truncated. Negative values for months are taken from the year into previous years. Negative values for days are taken from the month into previous months.

Data Types

Accepts numeric data. Returns a DateTime object.

Examples

DATE(A1,B1,C1)

DATE(R1C1,R1C2,R1C3)

DATE(2003,1,1) gives the result January 1, 2003

DATE(2004,2,10) gives the result February 10, 2004

See Also