DAY
Extracts the day-of-month (1 to 31) from a date serial.
The Formualizer engine in this repository at 0.15.0 plus unreleased changes computes the example results. Known differences from Excel are listed on this page.
Syntax
=DAY(serial_number)
Arguments
| Argument | Type | Required | Default |
|---|---|---|---|
serial_number | number | Required | — |
Remarks
- A date argument may be text holding a date or time (
"10/26/1999","1999-10-26 14:05"), read as its serial; text that is neither a number nor a date returns#VALUE!. - Fractional time is ignored; only the integer serial portion is used.
- Serials are interpreted with the workbook's date system (Excel 1900 or Excel 1904).
- Output is the day within the month, not day-of-year.
Examples
Extract the date component from a leap-day date.
Formula =DAY(DATE(2024,2,29))
Expected result 29
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Read the date component from a serial that also contains a time fraction.
Formula =DAY(DATE(2024,12,31)+0.75)
Expected result 31
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Read the component of the first day of the 1900 date system.
Formula =DAY(1)
Expected result 1
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
An unrecognized date string cannot be interpreted as a serial.
Formula =DAY("not a date")
Expected result #VALUE!
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Extract day from first-of-month
Formula =DAY(44927)
Expected result 1
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Extract day from leap date
Formula =DAY(45351)
Expected result 29
Try this formula
This editor runs the published Formualizer 0.14.0 package, so the last digits can differ and functions newer than that release return #NAME?.
Related functions
FAQ
Does DAY return day-of-year or day-of-month?
DAY returns the day number within the month (1-31), not the ordinal day of the year.