Skip to content

SQL datetime — SQL datetime (YYYY-MM-DD HH:mm:ss)

Pattern YYYY-MM-DD HH:mm:ss · e.g. 2022-06-29 13:45:31

About this format

Fields
Year, Month, Day, Hour, Min, Sec
Clock
24-hour
Carries a time zone
No — the zone must be known from context
Typically seen in
MySQL DATETIME, PostgreSQL timestamp, SQLite, CSV exports from databases

Sample values

  • 2026-06-29 14:30:00
  • 2028-02-29 09:05:07
  • 1970-01-01 00:00:00

Read the full guide

Try it: SQL datetime to ISO 8601

Swap → ISO 8601 to SQL datetime

ISO 8601 · YYYY-MM-DDTHH:mm:ss.SSSZ

2022-06-29T13:45:31.000Z

No time zone in the value: read as UTC.

Convert SQL datetime to…

Convert to SQL datetime from…