In a formula-type column, the YEAR_MONTH() function displays the year and month from a date-type column. It serves as a monthly grouping key: aggregating revenue by month, sorting records by year-month, feeding a pivot table by period.
Syntax
YEAR_MONTH(date_column)
Parameters
The output format of the column can be chosen in the output field options of the formula editor. For more details, see Output format options in the Formula Column article.
Examples
Display the year and month
YEAR_MONTH($Date)
The Project 1 takes place in the 4th month of the year 2022.
Placing the year before the month ensures correct chronological sorting, unlike displaying the month alone, which would mix years together.
Go further
YEAR_QUARTER
Combine the year with the quarter instead of the month.
Or continue with
Formula glossary
All available operators and functions, sorted by category.