1 now ()//Current Time 2 sysdate ()//Current time 3 Current_timestamp 4 returns the current date and time in ' Yyyy-mm-dd HH:MM:SS ' or YYYYMMDDHHMMSS format, Depends on whether the function is used in a string or in the context of a number. 5 mysql> Select Now (); 6 ' 1997-12-15 23:50:26 ' 7 mysql> Select now () + 0; 8-19971215235026
1 Unix_timestamp (date) 2 returns a UNIX timestamp (the number of seconds from ' 1970-01-01 00:00:00 ' GMT) if no argument is called. If Unix_timestamp () is called with a date parameter, it returns the value of the second starting at ' 1970-01-01 00:00:00 ' GMT. Date can be a date string, a DateTime string, a timestamp, or a number in the local time in YYMMDD or YYYYMMDD format. 3 mysql> Select Unix_timestamp (), 4-8822263575 mysql> Select Unix_timestamp (' 1997-10-04 22:23:00 '); 6-8759965807 When Unix_timestamp is used for a timestamp column, the function will accept the value directly, without the implied "String-to-unix-timestamp" transform.
1 From_unixtime (Unix_timestamp) 2 returns the value represented by the YYYYMMDDHHMMSS parameter in the ' Yyyy-mm-dd HH:MM:SS ' or unix_timestamp format. Depends on whether the function is used in a string or in a numeric context. 3 mysql> Select From_unixtime (875996580), 4, ' 1997-10-04 22:23:00 ' 5 mysql> Select From_unixtime (875996580) + 0; 6-19971004222300
1 From_unixtime (Unix_timestamp,format) 2 Returns a String representing the Unix time token, formatted according to the format string. FORMAT can contain the same modifiers as the entries listed in the Date_format () function. 3 mysql> Select From_unixtime (Unix_timestamp (), 4 '%Y%d%M%h:%i:%s%x '), 5, ' 1997 23rd December 03:43:30 X '
1 sec_to_time (seconds) 2 returns the seconds parameter, changing to hours, minutes, and seconds, with values formatted as ' HH:MM:SS ' or HHMMSS, depending on whether the function is used in a string or in a numeric context. 3 mysql> Select Sec_to_time (2378); 4, ' 00:39:38 ' 5 mysql> Select Sec_to_time (2378) + 0;6-3938
Time_to_sec (time) returns the time parameter, converted to seconds. Mysql> Select Time_to_sec (' 22:23:00 ');-> 80580mysql> Select Time_to_sec (' 00:39:38 ');-> 2378
This article page can be http://www.cnblogs.com/zeroone/archive/2010/05/05/1727659.html
Select COUNT (*) from ' Tbl_app ' WHERE ' Create_time ' >unix_timestamp (now ()) -24*60*60
MySQL Time function conversion