select date_format(‘1997-10-04 22:23:00’,’%y %M %b %D %W %a %Y-%m-%d %H:%i:%s %r %T’); 结果:97 October Oct 4th Saturday Sat 1997-10-04 22:23:00 10:23:00 PM 22:23:00
getdate = “2006-12-07” SELECT count() FROM t_get_video_temp Where DATE_FORMAT(get_date, ‘%Y-%m-%d’)=’2006-12-07’; select year(get_date),month(get_date),day(get_date) year() 获取年 month() 获取月 day() 获取日 SELECT count() FROM t_get_video_temp Where get_date like ‘2006%-07%’; _date_sub(date,interval 1 day )[