Date and time formulas
There is no data or time data type on Conjointly. The function toDateTime
lets you convert a date and time presented in a ISO 8601 formatted string into a number. If the conversion is impossible, it returns the undefined value.
Usage: toDateTime({text})
, where text
is a string in the ISO 8601 format.
Examples are provided below.
Formula | Result |
---|---|
toDateTime("2022-05") > toDateTime("2022-04") | TRUE (boolean) |
toDateTime("2022-05-03") < toDateTime("2022-05-02") | FALSE (boolean) |
toDateTime("2022-05-03T12:00:00") | 1651543200000 (number) |
toDateTime("2022-05-03T12:00:00") + 1 | 1651543200001 (number) |
toDateTime("2022-05-03T12:00:00") + 1/24 | 1651543200000.0417 (number) |
toDateTime("2023-12-01 10:45:49") | 1701391549000 (number) |
toDateTime(" 2023-12-01 10:45:49") | undefined |
toDateTime("2023-13-01 10:45:49") | undefined |