+
+ // dates in string format
+ String trimmeddate1 = date1.replaceAll("\\s", "");
+ String trimmeddate2 = date2.replaceAll("\\s", "");
+ // dates in long format
+ long longDate1 = DateFormatter.DateParsing(date1, formaterYYMMDD);
+ long longDate2 = DateFormatter.DateParsing(date2, formaterYYMMDD);
+ String error = DateChecking(trimmeddate1, trimmeddate2, longDate1, longDate2);
+ if (error != null) {
+ model.put("error", error);
+ model.put("date1", date1);
+ model.put("date2", date2);
+ return "query/JobStatistics";
+ }
+
+ if (longDate1 < CassandraReader.earliestDate())
+ longDate1 = CassandraReader.earliestDate();
+ if (longDate2 > loccal.getTimeInMillis())
+ longDate2 = loccal.getTimeInMillis();
+
+ date1 = DateFormatter.DateLongToString(longDate1, formaterYYMMDD);
+ date2 = DateFormatter.DateLongToString(longDate2, formaterYYMMDD);