date()

Converts an ISO 8601 formatted date string to a timestamp.

Syntax

date(datetime_string)

Parameters

Parameter Type Description
datetime_string String An ISO 8601 formatted date-time string.

Return Value

Examples

date("2025-03-02T14:51:23Z");       // returns 1740923483
date("2000-01-01T00:00:00Z");       // returns 946684800
date("2023-01-25T18:13:57+01:00");  // returns 1674670437

See also

date
datetime
year
month
day
hour
minute
second
millisec