DATE_FORMAT
select city_name,begin_time from t_city_parttime_info where enable=1 and DATE_FORMAT(begin_time,"%H")="00" ;
http://www.w3schools.com/sql/func_date_format.asp
FROM_UNIXTIME 与 UNIX_TIMESTAMP
SELECT FROM_UNIXTIME( 1249488000, '%Y-%m-%d' )
UNIX_TIMESTAMP() 是与之相对正好相反的时间函数
SELECT UNIX_TIMESTAMP() ;
SELECT UNIX_TIMESTAMP('2009-08-06') ;
http://www.cnblogs.com/showker/archive/2010/03/18/1689054.html
网友评论