MeridianMERIDIAN

datetime

Dates, times, timestamps, durations, and timezone offsets

8 categories, 89 types: 69 with a format string, 12 a sibling in its category also accepts, none accepted by another category's rule, 18 standard in CLDR locales, 7 that decompose into parts, 1 in Meridian's open data.

8 categories · 89 types

The 8 datetime categories

CategoryTypesCasts toFor exampleWithin the group
40DATE04-03-2411 a sibling accepts, 11 misread
31TIMESTAMP, TIMESTAMPTZ, VARCHAR2024-03-04 05:06:07.123456+0…1 a sibling also accepts
5TIME05:06 AMeach told apart
4VARCHAR, SMALLINTMondayeach told apart
3TIMESTAMP1705312200000000each told apart
3VARCHARAmerica/New_Yorkeach told apart
2DATE, VARCHARFY2024each told apart
1INTERVALPT30M—

Where datetime categories overlap

No value a type writes is accepted by another category's rule.

Which datetime type is it?

3 of 89 datetime types in 1 category accept it, and read it 3 ways.

DuckDB cannot run one of these types' rules, so the box cannot say whether it accepts a value.

Day of Week Name, Full Month Name and Periodicity carry no pattern or format, so they have no rule to ask.

What the engine extracts

  • date5 of 40era · era_name · era_year · month · year
  • period2 of 2quarter · year

In Meridian's open data

Use it

CLI · DuckDB
$ for v in '04-03-24' '2024-03-04 05:06:07.123456+00' '05:06 AM' 'Monday' '1705312200000000' 'America/New_York' 'FY2024' 'PT30M'; do finetype infer -i "$v"; done

SELECT v, ft_infer(v) FROM (VALUES ('04-03-24'), ('2024-03-04 05:06:07.123456+00'), ('05:06 AM'), ('Monday'), ('1705312200000000'), ('America/New_York'), ('FY2024'), ('PT30M')) t(v);

Type Registry