This is the format that I want to read "YYYYMMDD_HHMMSS_FV.BPO", However I only know the Date Format YYYYMMDD and I have no clue "HHMMSS". Is there a way, to read the above format by using a wild card or something?
Calendar c = Calendar.getInstance();
c.setTime(this.processDate);
int month = c.get(Calendar.MONTH) + 1;
String sMonth = null;
if (month < 10) {
sMonth = "0" + month;
} else {
sMonth = Integer.toString(month);
}
int days = c.get(Calendar.DAY_OF_MONTH);
String sDays = null;
if (days < 10) {
sDays = "0" + days;
} else {
sDays = Integer.toString(days);
}
int years = c.get(Calendar.YEAR);
String sYears = Integer.toString(years);
String dateFormatStr = sYears + sMonth + sDays;
String fileName = dateFormatStr + "_" + * + "_" + "FV.BPO";