MONTH Function – Google Sheets

The MONTH function is a simple date function that extracts the month from a given time. If you work with times but only care about the months, the MONTH function lets you eliminate everything else.

Remember that dates are just saved as numbers by your spreadsheet with date formatting applied.

MONTH function help box
MONTH Function

Purpose

The MONTH function returns the month’s value from any given unit of time.

Syntax

=MONTH(time)

Common Errors

#VALUE! – An invalid date was passed to the function such as "1/32/2022". The month of January does not have 32 days.

#ERROR! – Formula parse error. The input to the function could not be used such as a date with too many slashes. – 1//21/2222.

#NUM! – Result was not a number. The number is too large to resolve to a date. – (548748511).

The output is an unexpected format such as 12:00 AM. – This means the formatting is incorrect, not the underlying number. Change the formatting to Number.

app icon for TIMEDIF with a calendar and clock
TIMEDIF – Google Sheets Add-On

Calculate any duration in:

  • Years
  • Months
  • Weeks
  • Days
  • Hours
  • Minutes
  • Seconds
  • Milliseconds

Examples

Example 1 – Plain and Simple

First, here are a few simple examples of the MONTH function.

FormulaDescriptionResult
=MONTH("10/5/2016")Extract the month value from 10/5/2016.10
=MONTH("October")Return the month of October.#VALUE!
=MONTH("October 8")Extract the month value from October 810

Tip: Notice that the MONTH function can’t figure out what you mean by “October” unless you put a day value in front of it. See how dates and times work to 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
  • 1 A random date typed in using slashes.
  • 2 A random date typed in using dashes. Note that it is processed the same way as the date with slashes.
  • 3 Typed a random date in and added a time. Now the function extracts the hours and minutes.
  • 4 Typed in a date but spelled out. Writing out the date also works, but it won’t work if you write the day as “31st” instead of 31.
  • 5 If you only type in a time, the “zero” date is 12/30/1899.
  • 6 Entered with the NOW function. The output will constantly change in the linked Google Sheet.
  • 7 Entered with the TODAY function. The output will change daily in the linked Google Sheet.
  • 8 A blank cell is December 30, 1899. Similar to tickmark 5.
  • 9 Typing a 1 will increment the value in number 10 above 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.
  • 10 Just a decimal with no whole number increments the value by hours, minutes, and seconds instead of days.
  • 11 To get near the current date, you need to start with 43,000 days away from 12/30/1899.

Live Examples in Sheets

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

Video Explanations

11 thoughts on “MONTH Function – Google Sheets”

  1. Hi,

    is there a way to not have it do what it does when it’s blank? I want to use the data for a pivot table and this makes it not accurate for the month December?

    Thanks for your help!
    Best
    Anna

  2. Hi, I am fairly new to sheets but I am trying to return a query when a row’s month equals a month of today function. I want data that only matches the current month. How would I do this?

  3. HI I have been having hard time … I want to generate a report of all my by month
    =query(Data!A6:AB100,”Select * where A>= Date’2021-06-01′”).
    If I want to get all the data from month of June ? My Data is stored in a column A its formatted as Date for example =6/09/2021. How can I just tell it to only get by the month ? I tried to tell between June 1 – 31th? It marks an error.
    thank you for your videos btw 🙂

  4. Why would this not work?

    Column A| Custom format Mmm
    Column Bl date format DD Mmm YY

    Column A | =month(BN)
    Column B l input dates

    Unexpected actual results
    A | B
    Jan | 28 Dec 21
    Jan | 29 Dec 21
    Dec | 01 Jan 22
    Jan | 04 Jun 08

  5. A B
    DATE MONTH
    1/12/2023 1
    2/9/2023 2
    2/16/2023 2
    12
    12
    12
    12

    Column A is date input, column B is =month(a2) formula and then copied down the line.

    If Column A is empty, I am getting a value returned as 12.

    I tried many IFERROR functions, but always get a parse error. I need Column B to be blank if Column A is blank, as I have count & sum functions by the month based solely on the input of A

    Your help is greatly appreciated with this.

    Brian

Leave a Comment