DAY

Return the day number, 1 to 31, from a date.

Syntax

DAY(serial_number)
Argument Required Description
serial_number Required A date, usually a cell reference or a DATE() call.

Examples

Every example below was executed against VisiGrid engine 0.35.0 — not transcribed from another vendor's documentation. Reproduce any of them with vgrid calc.

Formula Result Notes
=DAY(DATE(2024,3,15)) 15
=DAY(DATE(2024,3,0)) 29 Day 0 of March rolled back to 29 February, a leap year.
=DAY(EOMONTH(DATE(2024,2,10),0)) 29 How many days were in that month.

Counting the days in a month

DAY of a month’s last date gives its length, which no dedicated function provides:

=DAY(EOMONTH(A1, 0))     → 29 for February 2024

Leap years included, without a rule about years divisible by four. That is worth preferring over any hand-written check, because the actual leap rule has three clauses and most hand-written versions have one.

Excel compatibility

Matches Excel.

Related functions

Last updated