Skip to main content
Converts a DATE or DATETIME value into a UNIX timestamp. If no parameter is specified, this function converts the current time into a UNIX timestamp. The date parameter must be of the DATE or DATETIME type. For time before 1970-01-01 00:00:00 or after 2038-01-19 11:14:07, this function returns 0. For more information about the date format, see date_format. This function may return different results for different time zones. For more information, see Configure a time zone.

Syntax

Examples

Text

keyword

UNIX_TIMESTAMP,UNIX,TIMESTAMP