Reference: Https://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_unix-timestamp
Unix_timestamp () : Returns a UNIX TIMESTAMP (seconds since ‘1970-01-01 00:00:00‘ UTC).--the difference in the number of seconds from ' 1970-01-01 00:00:00 ' to the current time
Cases:
SELECT Unix_timestamp (); ====> 1507520072
Unix_timestamp (date) : It returns the value of the argument as seconds since ‘1970-01-01 00:00:00‘ utc.--since ' 1970-01-01 00:00:00 ' with The number of seconds in the specified time difference
1>. The date argument May is a DATE , DATETIME , or TIMESTAMP string, or a number in YYMMDD , YYMMDDHHMMSS , YYYYMMDD or YYYYMMDDHHMMSS format.
Where date can be a date,datetime or timestamp string, or it can be a number in YYMMDD,YYMMDDHHMMSS,YYYYMMDD or YYYYMMDDHHMMSS format.
Cases:
SELECT unix_timestamp (' 2017-10-8 08:08:08 '); ====> 1507421288
SELECT Unix_timestamp (Current_date ()); ====> 1507478400
SELECT Unix_timestamp (now ()); ====> 1507520319
Note: The return value of Current_date () is a DATE string format; The return value of now () is a datetime string format
Mysql function Usage record (iii)--unix_timestamp (), Unix_timestamp (date)