SQL Minute-Precision Datetime
datetime.timestamp.sql_minutesSpace-separated date and time to minute precision, without seconds or timezone (e.g. 2024-01-15 10:30). The minute-precision sibling of sql_standard; DuckDB parses it natively as a TIMESTAMP (padding :00). Common in spreadsheet and database exports that drop the seconds field.
Try a value
SQL Minute-Precision Datetime's rule accepts it.
Reads it as 2024-03-04 05:06:00
Worked samples
DuckDB 1.5.5 · finetype 0.6.66
| Value | As TIMESTAMP |
|---|---|
| 2024-01-15 10:30 | 2024-01-15 10:30:00 |
| 2019-12-31 23:59 | 2019-12-31 23:59:00 |
- %Y
- four-digit year
- %m
- month, two digits
- %d
- day of month, two digits
- %H
- hour, 24-hour clock
- %M
- minutes
Shape
^\d{4}-\d{2}-\d{2} \d{2}:\d{2}$| Value | Length | Shape |
|---|---|---|
| 2024-01-15 10:30 | 16 | matches |
| 2019-12-31 23:59 | 16 | matches |
| 2024-01-15 10:3 | 15 | rejected: one character short |
Background
Origin
FineType defines the sql_minutes type itself, as a space-separated date and time to minute precision with no seconds or time zone.[1] FineType's label for the type gives the format string %Y-%m-%d %H:%M.[1]
ISO 8601 was first published in 1988.[2] ISO 8601 allows the seconds, or the minutes and seconds, to be omitted from a time for greater brevity, at the cost of precision.[2] ISO 8601 does not allow a space to separate the date and time parts.[2]
RFC 3339, Date and Time on the Internet: Timestamps, was written by G. Klyne and C. Newman and published in July 2002.[3] RFC 3339 notes that applications may choose, for the sake of readability, to separate the full date and full time with a space character rather than the T that ISO 8601 defines.[3] RFC 3339's timestamp grammar still requires the seconds field.[3] A value like 2024-01-15 10:30 is best read as a blend of the two: ISO 8601's permission to stop at the minute, written with RFC 3339's readable space. (Meridian's view)
Use
PostgreSQL accepts the ISO 8601 T separator on input but writes a space on output, for readability and for consistency with RFC 3339 and some other database systems.[4] PostgreSQL's table of time input forms lists 04:05, with no seconds, as an ISO 8601 form.[4] SQLite's date and time functions list YYYY-MM-DD HH:MM among the time value formats they accept.[5] MySQL's reference manual describes DATETIME and TIMESTAMP string values in the 'YYYY-MM-DD hh:mm:ss' format.[6] MySQL's reference manual says the date and time parts can be separated by T rather than a space.[6] Python's datetime.fromisoformat documentation says the T separator may be replaced by any single unicode character.[7]
Treat a minute-precision timestamp as one that has lost its seconds rather than one that never had any: 10:30 could stand for any moment from 10:30:00 to 10:30:59. (Meridian's view) Parse the column with an explicit format string such as %Y-%m-%d %H:%M rather than relying on a parser's guess. (Meridian's view) Check whether the same column mixes minute-precision values with values that carry seconds before choosing one format for all of it. (Meridian's view) Nothing in the value says which time zone it was written in, so find that out from the source before comparing it with timestamps from elsewhere. (Meridian's view)
Sources
- [1]finetype/labels/definitions_datetime.yaml at main · meridian-online/finetypeFineType
- [2]ISO 8601secondary source
- [3]RFC 3339: Date and Time on the Internet: Timestampsstandard
- [4]PostgreSQL: Documentation: 18: 8.5. Date/Time Typesdocumentation
- [5]Date And Time Functionsdocumentation
- [6]MySQL :: MySQL 8.4 Reference Manual :: 11.1.3 Date and Time Literalsdocumentation
- [7]datetime — Basic date and time typesdocumentation
Detection notes
Added 2026-07-11 (minute-precision timestamp family completion). Add-not- broaden: sql_standard keeps its seconds-required pattern so round-trip transforms stay correct; this leaf owns the zoneless minute form. Recovered deterministically by datetime_format_refinement (the 244-dim model does not predict it). Sibling of dmy_hm (slash/day-first minute) and iso_minutes (ISO-T minute).
Use it
$ finetype infer -i "2024-01-15 10:30" --mode column
→ datetime.timestamp.sql_minutes
SELECT ft_infer('2024-01-15 10:30');
-- → 'datetime.timestamp.sql_minutes'strptime({col}, '%Y-%m-%d %H:%M')
-- Format: %Y-%m-%d %H:%MSchema
https://meridian.online/schemas/datetime.timestamp.sql_minutes · Frictionless type datetime · %Y-%m-%d %H:%M
finetype taxonomy datetime.timestamp.sql_minutes -o json-schema