List of utility methods to do Parse Date
Date | parseDateWithPattern(Date value, String pattern) parse Date With Pattern String dateValue = formatDateWithPattern(value, pattern);
return parseDateWithPattern(dateValue, pattern);
|
Date | parseDateWithPattern(String dateValue, String pattern) parse Date With Pattern if (dateValue == null || dateValue.trim().length() == 0) { return null; Date result = null; SimpleDateFormat sdf = new SimpleDateFormat(pattern); try { result = sdf.parse(dateValue); } catch (Exception e) { ... |
Date | parseDateWithTimezone(String dateValue) Parses the date with timezone. Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat(DATE_MONTH_YEAR_FMT, Locale.ENGLISH); date = sdf.parse(dateValue); return date; |