DATE_PARSE

All functions > DATE AND TIME > DATE_PARSE

Returns a timestamp from the given string and format.

Signatures

Returns: A TIMESTAMP value parsed from the string

DATE_PARSE(string: VARCHAR, format: VARCHAR) → TIMESTAMP
sql
ParameterTypeRequiredDescription
stringVARCHARYesThe date/time string to parse
formatVARCHARYesThe format string matching the input (e.g., '%Y-%m-%d')

Notes

  • Parses date/time string according to the specified format
  • Format uses strftime-style placeholders matching the input
  • Returns NULL if the string doesn't match the format
  • Inverse of DATE_FORMAT
  • Useful for parsing custom date formats from external sources

Examples

FeatureQL
SELECT
    f1 := DATE_PARSE('2024-03-15', '%Y-%m-%d'),  -- Parse date string
    f2 := DATE_PARSE('15/03/2024 10:30', '%d/%m/%Y %H:%M')  -- Parse custom format
;
Result
f1 TIMESTAMPf2 TIMESTAMP
2024-03-15T00:00:002024-03-15T10:30:00

Last update at: 2026/03/03 16:47:38
Last updated: 2026-03-03 16:48:19