Extract Month and Year from Date field

The formulas for extracting Months and Year from a date field in saved searches

  1. 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
  2. TO_CHAR({datecreated},’YYYY’) – displays year in character. Ex:2021
  3. EXTRACT( MONTH FROM {datecreated}) – displays month in number format. Ex: 4
  4. EXTRACT( YEAR FROM {datecreated}) – displays year. Ex:201

Leave a comment

Your email address will not be published. Required fields are marked *