用 sql 获取一段时间内的数据: SELECT * FROM EDI.edi_history WHERE timestampdiff(day, SYSDATE(), create_time_loc) <= AND timestampdiff(day, SYSDATE(), create_time_loc) >= ; SELECT * FROM 表名 WHERE timestampdiff(MINUTE, SYSDATE(), send_time) <= AND timestampdif
1.求取某一段时间内的每一天 Date date0 = new SimpleDateFormat("yyyy-MM-dd").parse("2014-01-01"); Date date1 = new SimpleDateFormat("yyyy-MM-dd").parse("2014-10-03"); Calendar cal = Calendar.getInstance(); cal.setTime(date0); whi