9.2. The ISO Half-Open Interval Model
The display formats for temporal data are defined by the ISO-8601 Standard. The display formats are important, of course, but even more important is the underlying model of durations. They are considered to be half-open intervals. That means that we have an exact point in time when an event starts, but we can only approach the end of it as a limit. To make that clearer, consider the date 2006-12-31 as a shorthand for the interval (2006-12-31 00:00:00 through 2006-12-31 23:59:59.999...). There is no such time as “2006-12-31 24:00:00” in this model; technically, the hour does not exist, and you meant to say “2007:01-01 00:00:00” instead.
DB2 and other SQL products allow a timestamp whose time part is 24:00:00.000000. ...
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