date
Returns the current date, a specific date, converts a timestamp to a date structure, or extracts the date from a datetime.
Syntax
-
date()
-
date(X)
-
X
is any object
-
-
date(y, m, d)
-
y
,m
, andd
are integers
-
Description
-
date()
returns the current date as aDate
structure. -
date(X)
, whereX
is a timestamp, aDate
structure, or aDateTime
structure, returns this date, or the date part ofX
, as aDate
structure. -
date(y, m, d)
encodes the date with yeary
, monthm
, and dayd
as aDate
structure.
Examples
date()
year: 2022 month: oktober day: 17
date(10000)
year: 1927 month: maj day: 18
date(1980, 07, 31)
year: 1980 month: juli day: 31
date(now())
year: 2022 month: oktober day: 17