MONTH

MONTH(serial_number)

Returns the month as an integer given a date serial number.

serial_numberThe date that contains the month you want to find.

REMARKS
* This function returns a number between 1 and 12.
* The "serial_number" can be a date, value, cell reference or a text string in a date format.
* If "serial_number" < 0, then #NUM! is returned.
* If "serial_number" is not a valid date, then #VALUE! is returned.
* If you want to enter a static date that will not change or update, use the shortcut key (Ctrl + ;).
* You can use the DATE function to return the date serial number given a year, month, day.
* You can use the DATEVALUE function to return the date serial number for a date in text format.
* You can use the DAY function to return the day as an integer given a date serial number.
* You can use the EDATE to move a certain number of months before or after a date.
* You can use the EOMONTH function to return the last day of a month before or after a date.
* You can use the NOW function to return the serial number of the current system date and time.
* You can use the TIME function to return the time as a decimal given the HOUR, MINUTE, SECOND.
* You can use the TODAY function to return the serial number of the current system date.
* You can use the YEAR function to return the year as an integer given a date serial number.
* You can use the DAYSINAMONTH - User Defined Function to return the number of days in a particular month and year.
* The equivalent VBA function is VBA.MONTH
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 AB
1=TODAY() = Sunday, March 17, 202401 July 2023
2=NOW() = Sunday, March 17, 2024, 07:38=NOW() = 17/03/2024
3=MONTH(B1) = 7=NOW() = 45368
4=MONTH("01 Jul 2023") = 7 
5=MONTH(B2) = 3 
6=MONTH(38093) = 4 
7=MONTH(DATE(2023, 7, 1)) = 7 
8=MONTH(0) = 1 
9=MONTH(-10) = #NUM! 
10=MONTH("some text") = #VALUE! 

1 - What is the current system date. This cell has been formatted with the number format "dddd, mmmm dd, yyyy".
2 - What is the current system date and time. This cell has been formatted with the number format "dddd, mmmm dd, yyyy, hh:mm".
3 - What is the month component from the date displayed in cell "B1".
4 - What is the month component from the date "01 Jul 2023".
5 - What is the month component from the date displayed in cell "B2".
6 - What is the month component from the date serial number 38093.
7 - What is the month component from the date "1/7/2023"
8 - What is the month component from the number 0.
9 - If the serial_number is less than zero, #NUM! is returned.
10 - If the serial_number is not numeric, then #VALUE! is returned.

© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top