SQL TIMESTAMP Data Type
A date AND a time together — down to fractional seconds, optionally aware of timezone.
What & Why
TIMESTAMP stores both a calendar date and a time of day. Postgres offers two variants: TIMESTAMP (no timezone awareness — stores exactly the value given) and TIMESTAMPTZ (timezone-aware — stored internally in UTC, converted for display based on the session's timezone setting).
See How It Works
REFERENCE EXAMPLE
| Value | Type |
|---|---|
| 2024-01-15 | DATE |
| 2024-01-15 09:30:00 | TIMESTAMP |
| 2024-01-15 09:30:00+00 | TIMESTAMPTZ |
The result uses the same Queryflo columns shown in the worked example.
Sign up free to try it on a real business scenario