DAY Function – Get Day Number – Excel, VBA, Google Sheets

Written by

Editorial Team

Reviewed by

Steve Rynearson

Last updated on November 6, 2023
Download Example Workbook

Download the example workbook

This tutorial demonstrates how to use the Excel DAY Function in Excel to get the day of the month.
DAY Main Function

DAY Examples

The DAY Function returns the day number of a date:



Day Number of Year

To calculate the day number of the year, subtract the first day of the year from your desired date. Do this by using the DATE and YEAR Functions:


Day Year to date

DAY and MONTH Functions

Using the DATE and DAY Functions you can build a new date using the same day number as the original date:


Day Date

DAY in Google Sheets

The DAY Function works exactly the same in Google Sheets as in Excel:

DAY google sheet


DAY Examples in VBA

You can also use the DAY function in VBA. Type:

For the function arguments (serial_number, etc.), you can either enter them directly into the function, or define variables to use instead.

AI Formula Generator

Try for Free

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

Return to List of Excel Functions