Description
Datetime type
Name Description Range
DATETIME Represents a year, month, day, hour, minute, second, and subsecond. 0001-01-01 00:00:00 to 9999-12-31 23:59:59.999999.
A DATETIME represents a point in time. Each DATETIME contains the following:
year
month
day
hour
minute
second
subsecond
Unlike Timestamps, a DATETIME object does not refer to an absolute instance in time. Instead, it is the civil time, or the time that a user would see on a watch or calendar.
Canonical format
YYYY-[M]M-[D]D[( |T)[H]H:[M]M:[S]S[.DDDDDD]]
YYYY: Four-digit year
[M]M: One or two digit month
[D]D: One or two digit day
( |T): A space or a T separator
[H]H: One or two digit hour (valid values from 00 to 23)
[M]M: One or two digit minutes (valid values from 00 to 59)
[S]S: One or two digit seconds (valid values from 00 to 59)
[.DDDDDD]: Up to six fractional digits (i.e. up to microsecond precision)
Attachments
Issue Links
- duplicates
-
BEAM-10240 Support ZetaSQL DATETIME functions in BeamSQL
- Resolved
- is duplicated by
-
BEAM-7711 Support DATETIME as a logical type in BeamSQL
- Resolved