DATE
type
Applies to: Databricks SQL Databricks Runtime
Represents values comprising values of fields year, month, and day, without a time-zone.
Literals
DATE dateString
dateString
{ '[+|-]yyyy[...]' |
'[+|-]yyyy[...]-[m]m' |
'[+|-]yyyy[...]-[m]m-[d]d' |
'[+|-]yyyy[...]-[m]m-[d]d[T]' }
+
or-
: An option sign.-
indicates BCE,+
indicates CE (default).yyyy[...]
: Four digits that represent a year.[m]m
: A one or two digit month between01
and12
.[d]d
: A one or two digit day between01
and31
.
The prefix DATE
is case insensitive.
If the literal does not represent a proper date Databricks raises an error.