Access Parts of a Date

Use the EXTRACT() function to access parts of a date. You can use EXTRACT() in projections, filtering, grouping and ordering.

EXTRACT() follows this syntax.

A date part can be one of the following values.

  • YEAR
  • QUARTER
  • MONTH
  • WEEK
  • DAY
  • HOUR
  • MINUTE
  • SECOND
  • EPOCH_DAY
  • EPOCH
  • FISCAL_YEAR
  • FISCAL_QUARTER
  • FISCAL_MONTH
  • FISCAL_WEEK

If you query a date field that doesn’t contain time information, it will return 0.