List of utility methods to do String to Date Convert
Date | getDateFromString(String dateString) get Date From String, "EEE MMM dd HH:mm:ss ZZZZZ yyyy" sf.setLenient(true); Date date = null; try { date = sf.parse(dateString); } catch (ParseException e) { e.printStackTrace(); return date; ... |
Date | convertStringToDate(String date) convert String To Date Date result = null; SimpleDateFormat format = new SimpleDateFormat( "yyyy-MM-dd HH:mm:ss"); try { result = format.parse(date); } catch (Exception e) { e.printStackTrace(); return result; |