Skip to main content
YEAR_QUARTER
Arnaud Lachaume avatar
Written by Arnaud Lachaume
Updated over 2 months ago

Type: Formatter

Function: YEAR_QUARTER

Syntax: YEAR_QUARTER(datetime)

Description: Format a timestamp field in YYYY-QX format (e.g. “2023-Q3”). This formatter is used to group records in “year + quarter of the year” blocks.

Sample usage:

  • YEAR_QUARTER("2020-04-17") returns 2020-Q2

  • YEAR_QUARTER(created_at) returns the created_at field value in YYYY-QX format

Did this answer your question?