MONTH()

Syntax. MONTH(serial_number)

Definition. This function extracts the month number from a date. The calculated month numbers are in the range 1 (January) through 12 (December).

Arguments

  • serial_number (required). The date for which the month number is calculated.

Background. With this function, as well as with the YEAR() and DAY()functions, you can extract a valid date and use the components for other calculations. Use the MONTH() function to group values by month. Note that problems might occur if you enter dates as text. The values returned by the YEAR(), MONTH(), and DAY() functions correspond to the Gregorian calendar.

See Also

For more information about saving dates in Excel, see the section titled The Excel Date System in Chapter 2.

Example. Assume that you want to enable the Excel AutoFilter for the months and need to calculate the month values from a date column by using an auxiliary column. To do this, use the formula

=MONTH(date_value)

Here are more examples:

  • =MONTH(TODAY()) returns 9 in September.

  • =MONTH("11/14/1959") returns 11.

  • =MONTH("01/01/1900") returns 1.

  • =MONTH("12/31/1899") returns #VALUE!.

  • =MONTH("12/31/9999") returns 12.

  • =MONTH("01/01/10000") returns #VALUE!.

See Also

DAY(), HOUR(), MINUTE(), SECOND(), WEEKDAY(), WEEKNUM(), YEAR()

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.14.142.194