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 knowhow dates and times work.

Purpose

The DAY function returns the value of the month from any given unit of time.

Video Explanation

Syntax

=DAY(time)

Examples

Example 1 - Plain and Simple

A few simple examples of the DAY function.

FormulaDescriptionResult
=DAY("1/2016")Extract the day value from 1/2016.1
=DAY("1/31/2016")Extract the day value from 1/31/2016.31
=DAY("1")Extract the day value from 1.31

Tip: The DAY function shows its eccentricity whentrying to convert the number 1 to a day. See example9in Example 2 below. It helps to keep in mindhow dates and times workto make a little sense out of this.

Example 2 - Separating the values of a date and time.

Different date values examined using various functions.

Time valueTickmarkYEARMONTHDAYHOURMINUTESECONDFormatted as number
7/30/20161201673000042,581.00
7-30-20162201673000042,581.00
6/1/2017 2:32 PM32017611432042,887.61
July 31, 20164201673100042,582.00
12:30 PM518991230123000.52
4/11/2017 11:24:146201741111241442,836.48
4/11/20177201741100042,836.00
 818991230000 
19189912310001.00
0.2510189912306000.25
4300011201792200043,000.00
  • 1A random date typed in using slashes.
  • 2A random date typed in using dashes. Note that it is processed the same way as the date with slashes.
  • 3Typed a random date in and added a time. Now notice the hours and minutes being extracted.
  • 4Typed in a date but spelled out. This also works, but it won't work if you write the day as "31st" instead if 31.
  • 5If you only type in a time, the "zero" date is 12/30/1899.
  • 6Entered with theNOW function. This will change constantly in thelinked Google Sheet.
  • 7Entered with theTODAY function. This will change daily in thelinked Google Sheet.
  • 8A blank cell is December 30, 1899. Similar to tickmark 5.
  • 9Typing a 1 increments the value in number8above by 1 day. In other words "1=12/31/1899". It is just a matter of how it is displayed which can be controlled by going to the Format menu and choosing Number.
  • 10Just a decimal with no whole number increments the value by hours, minutes and seconds instead of days.
  • 11To get near the present date, you need to start with 43,000 days away from 12/30/1899.

 Live examples in Sheets 

Go tothis spreadsheetfor the examples of the YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND functions shown above that you can study and use anywhere you would like.