Datetime Types
Use datetime data types to represent the date and time of day. Datetime values have these characteristics:
They’re specified with a relationship to UTC, or Universal Coordinated Time (formerly called Greenwich Mean Time or GMT). SQL-92 requires that every SQL session have a default offset from UTC that is used for the duration of the session. –8 hours is the normal time-zone offset of San Francisco, California, for example.
The natural rules of the Gregorian calendar determine how date values are formed. DBMSes reject values that they can’t recognize as dates.
Time values are based on a 24-hour clock, also called military time (use 13:00, not 1:00 P.M.).
Hyphens (-) separate the parts of a date, and colons (:) separate the parts ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access