Composite date and time value
In the preceding sections, date and time values were treated separately. Some database systems, such as MySQL, use this approach by defining two data types—Date
and Time
data types. A DateTime
data type is a combination of both values in a common block. The Date
values are placed in the left-most part up to the second fractions. The predefined format is YYYY-MM-DDTHH:MI:SS[.FF]
. Second fractions are optional. The T
symbol is used to split the date and time values. Version 2019 allows you to omit the delimiter symbol, T
. So, all of the following values would be the same: 2022-12-30T15:26:01
, 2022-12-3015:26:01
, 2022-12-30T15:26:01.00
, and 2022-12-3015:26:01.00
.
Each day starts and ends at midnight, covered by the values 00:00
and 24:00
to distinguish the timeline positions (start of the day or end of the day). However, the value 24:00
is the same as 00:00
for the consecutive day. Thus, both of the following values express the same point in time...