SimpleDateFormat sdf = new SimpleDateFormat(fmt); try { Date t = sdf.parse(s); return t == null ? 0L : t.getTime(); } catch (ParseException e) { return 0L;
DecimalFormat format = new DecimalFormat("#.##"); return format.parse(d.toUpperCase().replace("+", "")).longValue();