Java Utililty Methods Parse Long

List of utility methods to do Parse Long

Description

The list of methods to do Parse Long are organized into topic(s).

Method

longparseLong(final String s, final String fmt)
parse Long
SimpleDateFormat sdf = new SimpleDateFormat(fmt);
try {
    Date t = sdf.parse(s);
    return t == null ? 0L : t.getTime();
} catch (ParseException e) {
return 0L;
longparseLong(String d)
parse Long
DecimalFormat format = new DecimalFormat("#.##");
return format.parse(d.toUpperCase().replace("+", "")).longValue();
StringparseLongtoTime(long date)
parse Longto Time
return dateFormat2.format(new Date(date));