Calendar c = Calendar.getInstance(); c.add(Calendar.DAY_OF_MONTH, offset); return new SimpleDateFormat("yyyy-MM-dd 00:00:00").format(c.getTime());
SimpleDateFormat fmt = new SimpleDateFormat(pFormat); SimpleDateFormat fmt2 = new SimpleDateFormat(pFormat); Date param_date1 = fmt.parse(strDate); Date param_date2 = fmt2.parse(strDate2); return getOffsetDays(param_date1, param_date2);