Extract Month from a Date (MONTH)

Syntax: MONTH(t)

The MONTH function is used to convert a date given in any recognizable format into the month number. For example:

=MONTH(DATE(2010; 6; 27))

returns 6.

images

Figure 12-8. Sample result of the MONTH function

You can give MONTH the date in a more natural format:

=MONTH("3/17/2010")

returns 3 (March 17, 2010).

See the description of the DATE function for another example of using the MONTH function in practice.

Get Beginning OpenOffice Calc: From Setting Up Simple Spreadsheets to Business Forecasting now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.