datetime.period.quarterCalendar quarter notation (Q1-Q4 with year). Ubiquitous in SEC filings, earnings data, and business intelligence dashboards. Represents a 3-month range. Transforms to first day of the quarter.
$ finetype infer -i "Q1 2024"
→ datetime.period.quarterSELECT finetype('Q1 2024');
-- → 'datetime.period.quarter'make_date(CAST(regexp_extract({col}, '(\d{4})') AS INT), (CAST(regexp_extract({col}, 'Q([1-4])') AS INT) - 1) * 3 + 1, 1)-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS DATE) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'datetime.period.quarter';quarter: CAST(regexp_extract({col}, 'Q([1-4])') AS INT)
year: CAST(regexp_extract({col}, '(\d{4})') AS INT){
"$id": "https://meridian.online/schemas/datetime.period.quarter",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "Calendar quarter notation (Q1-Q4 with year). Ubiquitous in SEC filings, earnings data, and business intelligence dashboards. Represents a 3-month range. Transforms to first day of the quarter.",
"examples": [
"Q1 2024",
"Q4 2023",
"2024-Q2",
"2023 Q3"
],
"pattern": "^(Q[1-4]\\s?\\d{4}|\\d{4}[\\s-]?Q[1-4])$",
"title": "Calendar Quarter",
"type": "string",
"x-finetype-broad-type": "DATE",
"x-finetype-transform": "make_date(CAST(regexp_extract({col}, '(\\d{4})') AS INT), (CAST(regexp_extract({col}, 'Q([1-4])') AS INT) - 1) * 3 + 1, 1)"
}Q1 2024Q4 20232024-Q22023 Q3