The DAY function is a simple date function that extracts just the day from a given time. If you are working with times, but only care about the day, the DAY function lets you get rid of everything else.
Before reading the examples below, ensure you know how dates and times work.
The DAY function returns the value of the month from any given unit of time.
Example 1 – Plain and Simple
A few simple examples of the DAY function.
||Extract the day value from 1/2016.||1|
||Extract the day value from 1/31/2016.||31|
||Extract the day value from 1.||31|
Tip: The DAY function shows its eccentricity when trying to convert the number 1 to a day. See example 9 in Example 2 below. It helps to keep in mind how dates and times work to make a little sense out of this.
Live examples in Sheets
Go to this spreadsheet for the examples of the YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND functions shown above that you can study and use anywhere you would like.