date_parse

Reads a date, or a date and time, from text into a timestamp, in the app's timezone. Without a format it accepts "2026-10-31", "2026-10-31 14:30", "2026-10-31T14:30:00" (with "Z" or an offset such as "-05:00" honored), "10/31/2026", "10/31/26", and the US forms with a time, "10/31/2026 2:30 pm". With a format, the text must have that shape; the format uses the letters of `datestring` (Y y m n d j H G h g i s a A), other characters standing for themselves. Text that is not a date gives null.

Runs on: either side: the compiler places the statement that calls it where the values it uses live.

Format:

date_parse(text [, format])

Parameters:

Parameter Type Description
text string the date text
format string  [Optional]the shape of the text, in datestring's letters

Returned Value:

Type Description
number the UNIX timestamp, or null

Examples

due_at = date_parse(get_form_values(form).due_date)