Description
Use this function to get a numeric date value for a given year, month, and day. Supported in Chains.
Syntax
DATEVALUE(YYYY/MM/DD)
orDATEVALUE(MM/DD/YYYY)
Inputs
This function has the following fields. They can be in the order "YYYY/MM/DD" or "MM/DD/YYYY":
Name | Required | Valid input |
year |
Yes | A four-digit year. (A two-digit year is presumed to be prefixed with "19".) This can be an integer or a formula which results in an integer in the range 1900–9999, or a cell reference. Quotation marks are not required. |
month |
Yes | A two-digit month. (A single digit is acceptable.) This can be an integer or a formula which results in an integer in the range 1–12, or a cell reference. Quotation marks are not required. |
day |
Yes | A two-digit day (A single digit is acceptable.) This can be an integer or a formula which results in an integer in the range 1–31, or a cell reference. |
Examples
Sample data
A (date) |
B (year) |
C (month) |
D (day) |
---|---|---|---|
28/2/2023 | 2024 | 1 | 23 |
36711 | 2000 | 12 | 11 |
2003/7/19 | 2003 | 7 | 19 |
24/12/2013 | 2024 | 12 | 24 |
Sample formulas
Formula | Description | Display | Value |
---|---|---|---|
=DATE(2023,4,6) |
Returns the value of the supplied date of April 6, 2023. | 4/6/2023 | 45022 |
=DATE(A3) |
Returns the value of the date identified by the supplied values in cell A3. | 7/19/2003 | 37821 |
=DATE(B2,C2,D2) |
Returns the value of the date identified by the supplied values in cells B2, C2,and D2. | 12/11/2000 | 36871 |
Related functions
DATE
DATEVALUE
DAY
DAYS
DAYS360
EDATE
EOMONTH
MONTH
NETWORKDAYS
NETWORKDAYS.INTL
WEEKDAY
WORKDAY
WORKDAY.INTL
YEAR
YEARFRAC