摘要:按周 select DATE_FORMAT(create_time,'%Y%u') weeks,count(caseid) count from tc_case group by weeks; 按月 select DATE_FORMAT(create_time,'%Y%m') months,coun
阅读全文
摘要:SELECT * FROM table_name WHERE to_days(createtime) = to_days(now()); SELECT * FROM table_name WHERE YEARWEEK(date_format(createtime,'%Y-%m-%d')- INTER
阅读全文
摘要:select id, phone,time,year(time),month(time), DAY(time),TIME(time) from user where phone='xxxxxx' #分别取年、月、日、时间select id, phone,time from user where ph
阅读全文