TODAY

TODAY returns the current date as a date value. Use coerce.to-integer and coerce.to-string function to convert the result to seconds and to a date as a string, respectively.

The structure of the date response returned follows the ISO 8601 standard.

+ / - operations can be used with the TODAY function, such as TODAY() - 10 or TODAY() + 10.

Function category: Date‚Äč

Syntax

TODAY()

Arguments

Description

None

No arguments. Always returns the current date.

Timestamp formats

Using the coercion functions with the TODAY() function formats the timestamp as either seconds or data/time formats.

UNIX timestamp milliseconds

The base result for TODAY() is milliseconds.

TODAY()
#
# results in
#
["LocalDate",1600128000000]

UNIX timestamp seconds

Adding coerce.to-integer to TODAY() results in a timestamp in seconds.

coerce.to-integer(TODAY())
#
# results in
#
1600128000

ISO 8601 Date Time format

Adding coerce.to-string to TODAY() results in a ISO 8601 date/time format.

coerce.to-string(TODAY())
#
# results in
#
"2020-09-15"