SimpleDateFormat SDF =NewSimpleDateFormat ("YYYY-MM-DD"); Date Date=NewDate (); String nowdate=Sdf.format (date); Calendar C=calendar.getinstance (); C.add (Calendar.month,0); C.Set(Calendar.day_of_month,1);//set to number 1th, the current date is the first day of the monthString firstdate =Sdf.format (C.gettime ()); if("". Equals (Form.getbegindate ()) | | Form.getbegindate () = =NULL) {System. out. println ("Early Month"+firstdate); Form.setbegindate (firstdate); } if("". Equals (Form.getenddate ()) | | Form.getenddate () = =NULL) {System. out. println ("Today"+nowdate); Form.setenddate (nowdate); } String SQL="select COUNT (id) from Getdealeraccount ("+form.getbegindate () +","+form.getend () +") "; System. out. println ("Report Count"+SQL); return This. jdbctemplate.queryforobject (SQL, Long.class);
Default incoming time period time Java