I am trying to get to and from date where ToDate will have previous date and FromDate will have first date of the current month. For January it wou
public static String getCurrentMonthFirstDate(){
Calendar c = Calendar.getInstance();
c.set(Calendar.DAY_OF_MONTH, 1);
DateFormat df = new SimpleDateFormat("MM-dd-yyyy");
//System.out.println(df.format(c.getTime()));
return df.format(c.getTime());
}
//Correction :output =02-01-2018