比如说有4条数据是
2014—8— 24
2014—8— 08
2014—9— 24
2014—9— 08
SELECT distinct date_format(create_time,'%Y-%m') from jjj_activity_record;
结果:
2014—8
2014—9
比如说有4条数据是
2014—8— 24
2014—8— 08
2014—9— 24
2014—9— 08
SELECT distinct date_format(create_time,'%Y-%m') from jjj_activity_record;
结果:
2014—8
2014—9
转载于:https://my.oschina.net/u/3381391/blog/1535244