The formulas for extracting Months and Year from a date field in saved searches
- TO_CHAR({datecreated},’MONTH’) – displays month name (Character) as result. Ex: April
instead of ‘Month’ we can specify the format in which the month should be displayed.
MON – Jan, Feb, etc
MM – a numeric month from 1 to 12 - TO_CHAR({datecreated},’YYYY’) – displays year in character. Ex:2021
- EXTRACT( MONTH FROM {datecreated}) – displays month in number format. Ex: 4
- EXTRACT( YEAR FROM {datecreated}) – displays year. Ex:201