Tom Azernour avatar
Written by Tom Azernour
Updated over a week ago

Type: Formatter


Syntax: YEAR_MONTH_DAY(datetime)

Description: Format a datetime in YYYY-MM-DD format (e.g. “2023-11-07”). This formatter is used to group records in “year + month + day” blocks, ignoring hours, minutes, and seconds.

Sample usage:

  • YEAR_MONTH_DAY("2020-04-17") returns 2020-04-17.

  • YEAR_MONTH(created_at) returns the created_at field value in YYYY-MM-DD format.

Did this answer your question?