public static String parseStandardDate(Date date){
  SimpleDateFormat formatter=new SimpleDateFormat("yyyyMMdd",Locale.getDefault());
  formatter.setLenient(false);
  return formatter.format(date);
}

public static String parseStandardDate ( Date date ) { SimpleDateFormat formatter = new SimpleDateFormat ( "yyyyMMdd" , Locale . getDefault ( ) ) ; formatter . setLenient ( false ) ; return formatter . format ( date ) ; }
parse date to string
