public static Date parseStandardDate(String date){
  SimpleDateFormat formatter=new SimpleDateFormat("yyyyMMdd",Locale.getDefault());
  formatter.setLenient(false);
  try {
    return formatter.parse(date);
  }
 catch (  ParseException e) {
    e.printStackTrace();
    return new Date();
  }
}

public static Date parseStandardDate ( String date ) { SimpleDateFormat formatter = new SimpleDateFormat ( "yyyyMMdd" , Locale . getDefault ( ) ) ; formatter . setLenient ( false ) ; try { return formatter . parse ( date ) ; } catch ( ParseException e ) { e . printStackTrace ( ) ; return new Date ( ) ; } }
parse " yyyymmdd " to date
