return asDate(date, format, "Unknown");
if (time > 0) { return DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM).format(new Date(time)); } else { return "-";
final Object value = map.get(key); if (value == null) { return null; if (value instanceof String) { try { return dateFormat().parse((String) value); } catch (ParseException ex) { ...
Date date = null; for (String pattern : datePatterns) { try { date = new SimpleDateFormat(pattern).parse(literal); } catch (ParseException e) { if (date == null) { ...
try { return DATE_FORMAT.parse(date); } catch (Exception e) { return null;
if (param == null) { return null; if (param instanceof String) { try { return format.parse(param); } catch (ParseException e) { throw new IllegalArgumentException( ...
if ("\"N/A\"".equals(s)) return null; return FMT_TRADE_DATE.get().parse(s);
asDate.
try { if (isIsoFormat(string)) { throw new RuntimeException("Date does not fit into ISO date format."); SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd"); Date date = simpleDateFormat.parse(string); return date; } catch (ParseException parseException) { ...
SimpleDateFormat df = new SimpleDateFormat(format); df.setLenient(false); try { ParsePosition pp = new ParsePosition(0); Date d = df.parse(value, pp); if (pp.getIndex() != value.length()) { d = null; return d; } catch (Exception e) { return null;
SimpleDateFormat date_format = new SimpleDateFormat(flameDateFormat); SimpleDateFormat excel_format = new SimpleDateFormat(excelDateFormat); Calendar c = Calendar.getInstance(); c.setTime(date_format.parse(timestamp)); return excel_format.format(c.getTime());