UNIX_TIMESTAMP

Converts a timestamp to a Unix timestamp (expressed in milliseconds since ‘1970-01-01 00:00:00’ UTC) as a BIGINT.

Syntax

UNIX_TIMESTAMP(timeStampExpr)
timeStampExpr must be a TIMESTAMP expression, written as <TIMESTAMP> { <character-literal> }.
Returns NULL if timeStampExpr is null. Otherwise, returns the result of *java.sql.Timestamp.getTime()* when run on the timestamp.

Example

values UNIX_TIMESTAMP(timestamp '2022-04-03 19:52:26.614');
'EXPR$0'
'1649015546614'