How to use DAY function in Excel?

The DAY function in Excel is used to extract the day of the month from a given date. The function returns an integer representing the day (from 1 to 31) based on the date provided.

Syntax

DAY(serial_number)
  • serial_number: This is the date from which you want to extract the day. It can be a date entered directly as a date, a cell reference containing the date, or a result of another function that returns a date.

Examples

  • Direct Date Entry

If you want to extract the day from the date March 15, 2023:

   =DAY("2023-03-15")

This will return `15`.

  • Using a Cell Reference

Suppose cell A1 contains the date `2023-05-10`, you would use:

   =DAY(A1)

This will return `10`.

  • Using Another Function

If you use a function like TODAY() to get the current date and you want to find the current day of the month:

   =DAY(TODAY())

This will return the current day of the month at the time the function is calculated.

Important Notes

  • Ensure that the date input (serial_number) is in a valid Excel date format, otherwise, the DAY function may return an error.
  • Excel stores dates as sequential serial numbers, and it’s this number format that the DAY function reads to return a day value.
  • You can also use the DAY function in combination with other date functions like MONTH, YEAR, and DATE for more complex date manipulations.

This function is particularly useful when you need to extract only the day from a full date for calculations, formatting, or data analysis purposes.

Unlock Your Potential

Excel

Basic - Advanced

Access

Access Basic - Advanced

Power BI

Power BI Basic - Advanced

Help us grow the project