赞
踩
select date_format(create_time, '%Y-%m') mont, count(*) coun
from t_content
group by date_format(create_time, '%Y-%m');
select date_format(create_time, '%Y-%m-%d') dat, count(*) coun
from t_content
group by date_format(create_time, '%Y-%m-%d');
select from_unixtime(create_time / 1000, '%Y-%m-%d') dat, count(*) coun
from t_content
group by from_unixtime(create_time / 1000, '%Y-%m-%d')
格式转换
select from_unixtime(create_time / 1000, '%Y-%m-%d %H:%i:%S') create_time
from t_content
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。