DATETIME
Convert text to ISO 8601 datetime

Description

Convert a valid date/datetime text, or a number representing milliseconds since the Unix Epoch (1 January, 1970 UTC), to an ISO 8601 formatted text representation.

Function signature

1
DATETIME(timestamp: Number|String, dateformat: String) => String
Copied!
Parameter
Description
Timestamp
Date text or number of milliseconds since 1 January, 1970 UTC
Date Format
If you know the format of an input text, you can use that to parse a date

Examples

Formula
Return value
DATETIME(0)
1970-01-01T00:00:00Z
DATETIME(5000)
1970-01-01T00:00:05Z
DATETIME("2019-12-31T23:59:55+05:00")
2019-12-31T23:59:55+05:00
Export as PDF
Copy link