datetime.date.compact_ym6-digit compact year-month with no separators. Data warehouse period keys, financial reporting codes. Could collide with 6-digit integers — requires header/context hints.
$ finetype infer -i "202401"
→ datetime.date.compact_ymSELECT finetype('202401');
-- → 'datetime.date.compact_ym'strptime({col} || '01', '%Y%m%d')::DATE
-- Format: %Y%m-- 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.date.compact_ym';month: CAST(SUBSTRING({col}, 5, 2) AS INT)
year: CAST(SUBSTRING({col}, 1, 4) AS INT){
"$id": "https://meridian.online/schemas/datetime.date.compact_ym",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "6-digit compact year-month with no separators. Data warehouse period keys, financial reporting codes. Could collide with 6-digit integers — requires header/context hints.",
"examples": [
"202401",
"202312",
"200006"
],
"maxLength": 6,
"minLength": 6,
"pattern": "^\\d{4}(0[1-9]|1[0-2])$",
"title": "Compact Year-Month (YYYYMM)",
"type": "string",
"x-finetype-broad-type": "DATE",
"x-finetype-format-string": "%Y%m",
"x-finetype-transform": "strptime({col} || '01', '%Y%m%d')::DATE"
}202401202312200006