datetime.time.hms_12h12-hour time with AM/PM indicator. Standard in US and some Commonwealth countries.
$ finetype infer -i "10:30:00 AM"
→ datetime.time.hms_12hSELECT finetype('10:30:00 AM');
-- → 'datetime.time.hms_12h'strptime({col}, '%I:%M:%S %p')::TIME
-- Format: %I:%M:%S %p-- Normalise and cast in one step
SELECT TRY_CAST(finetype_cast(my_column) AS TIME) AS clean_value
FROM my_table
WHERE finetype(my_column) = 'datetime.time.hms_12h';{
"$id": "https://meridian.online/schemas/datetime.time.hms_12h",
"$schema": "https://json-schema.org/draft/2020-12/schema",
"description": "12-hour time with AM/PM indicator. Standard in US and some Commonwealth countries.",
"examples": [
"10: 30: 00 AM",
"11: 59: 59 PM",
"12: 00: 00 AM"
],
"maxLength": 11,
"minLength": 11,
"pattern": "^\\d{2}:\\d{2}:\\d{2} [AP]M$",
"title": "12-Hour Time with AM/PM",
"type": "string",
"x-finetype-broad-type": "TIME",
"x-finetype-format-string": "%I:%M:%S %p",
"x-finetype-transform": "strptime({col}, '%I:%M:%S %p')::TIME"
}10:30:00 AM11:59:59 PM12:00:00 AM