The code below is the best I have come up with so far. The .setTime() methods are throwing a exception. Is there a better way to do this or correct this?
String format = "MM/dd/yyyy";
DateTime test = new DateTime();
DateTimeFormatter dateFormat = DateTimeFormatter.ofPattern("MM/dd/yyyy");
SimpleDateFormat formater = new SimpleDateFormat(format);
String startDateString = "09/10/2015";
String endDateString = "09/20/2015";
Date startDate = null;
Date endDate = null;
Calendar sampleDateStart = null;
Calendar sampleDateEnd = null;
try{
startDate = formater.parse(startDateString);
endDate = formater.parse(endDateString);
sampleDateStart.setTime(startDate);
sampleDateEnd.setTime(endDate);
}catch(Exception e){
System.out.println(e.getMessage());
}