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)-
Xis any object
-
-
date(y, m, d)-
y,m, anddare integers
-
Description
-
date()returns the current date as aDatestructure. -
date(X), whereXis a timestamp, aDatestructure, or aDateTimestructure, returns this date, or the date part ofX, as aDatestructure. -
date(y, m, d)encodes the date with yeary, monthm, and daydas aDatestructure.
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