Built-in Functions → parseTimestamp
parseTimestamp() is a conversion function that evaluates a string date expression (the first parameter), whose format has to match the string mask (the second parameter) and returns a timestamp.
Signature
parseTimestamp(string exp, string mask)
- string exp : an expression evaluating to
stringdate - string mask :
stringdescribing date format
Important
- The string mask value is case-sensitive.
- For a list of the supported date formats, refer to the Unicode Locale Data Markup Language (LDML).
- For details about how the Engine infers the date components, refer to Date inference logic.
.
Returns
timestamp
Example
Convert "2001-12-24 23:05:33.000" with format "yyyy-MM-dd HH:mm:ss.SSS" to type timestamp.
parseTimestamp("2001-12-24 23:05:33.000","yyyy-MM-dd HH:mm:ss.SSS")