UNIX_TIMESTAMP
Use UNIX_TIMESTAMP to convert a date expression to UNIX timestamp format. The first parameter is a date or timestamp. The second parameter is the format of the date expression, such as ‘yyyy-MM-dd’. The date_format parameter is not required if the date_expression references a date or datetime property in Compass data storage.
Syntax
UNIX_TIMESTAMP(date_expression)
Example
SELECT UNIX_TIMESTAMP ('2020-07-13 10:15:01')
Result :
1594635301