public static String getLastMonth(String currentMonth){
SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd");
Calendar c = Canlendar.getInstance();
try{
c.setTime(format.parse(currentMonth));
}catch(Exception e){
return null;
}
c.add(Calendar.MONTH,-1);
String lastMonth = format.format(c.getTime());
return lastMonth;
}