mysql unixtimestamp

avatar
作者
猴君
阅读量:0

MySQL’s UNIX_TIMESTAMP function is used to convert a given date or datetime value to a Unix timestamp. The Unix timestamp represents the number of seconds that have elapsed since January 1, 1970, at 00:00:00 UTC.

Here is an example of how to use the UNIX_TIMESTAMP function in MySQL:

SELECT UNIX_TIMESTAMP('2022-01-01 12:00:00') AS unix_timestamp; 

This query will return the Unix timestamp for the date and time ‘2022-01-01 12:00:00’.

广告一刻

为您即时展示最新活动产品广告消息,让您随时掌握产品活动新动态!