数据库中的日期格式化查询 不要时间
String sql = " select DATE_FORMAT(a.opt_time,'%Y-%m-%d') as date,system_name as name,count(system_id) as y from zhmh_opt_log a "
+ " where a.opt_type=2 and DATE_FORMAT(a.opt_time,'%Y-%m-%d') BETWEEN '"
+ startdate
+ "' and '"
+ enddate
+ "' GROUP BY a.system_id,DATE_FORMAT(a.opt_time,'%Y-%m-%d') ";