Date & Time

DAY Formula

DAY extracts the day of the month (1-31) from a date value. It is useful for payroll cutoff dates, identifying specific days in scheduling formulas, or breaking dates into components for custom formatting and validation.

Syntax

DAY(serial_number)
ParameterDescription
serial_number Parameter of the DAY function.
Try DAY in Viztab — free, no signup

Examples

Extract day from a date

Formula
=DAY(A2)
Returns: 15 — the day-of-month portion from a date like March 15, 2024

Check if it's the last day of the month

Formula
=IF(DAY(A2+1)=1, "Last Day", "")
Returns: "Last Day" if tomorrow would be the 1st, meaning today is the last day of the month

Payroll period flag

Formula
=IF(DAY(A2)<=15, "Period 1", "Period 2")
Returns: "Period 1" for days 1-15, "Period 2" for days 16-31

Common Errors

#VALUE!

The cell is not a valid date. Text that looks like a date must be converted using DATEVALUE() first.

Tips

Days in a month

=DAY(DATE(YEAR(A1), MONTH(A1)+1, 0)) returns how many days are in the month of the date in A1.

Nth weekday

Combine DAY with WEEKDAY to find specific business days or schedule dates within a month.

Date validation

Use DAY to verify imported dates: =IF(DAY(A1)>28, "Check this date", "OK") flags potentially problematic dates.

Try DAY in Viztab

Import your data and use DAY with 370+ other formulas. No signup required.

Open Viztab

Related Formulas