方法一:
1 SimpleDateFormat dateformat=new SimpleDateFormat("yyyy-MM-dd");
2 String today=dateformat.format(new Date());
3
4 String delSql = "delete from ssd_pms_forecast_recode where forecasteNum = ‘"+forecastNum+"‘ and forecasteTime >=to_date(‘"+today + " 00:00:00"+"‘,‘yyyy-MM-dd HH24:mi:ss‘)" +
5 " and forecasteTime <=to_date(‘"+today + " 23:59:59"+"‘,‘yyyy-MM-dd HH24:mi:ss‘)";
JDBC操作Oracle,根据日期查询,布布扣,bubuko.com
时间: 2024-10-12 12:46:09