Android Utililty Methods Date to Milliseconds Convert

List of utility methods to do Date to Milliseconds Convert

Description

The list of methods to do Date to Milliseconds Convert are organized into topic(s).

Method

longgetTimeInMillis(String date)
get Time In Millis
Date currentDate;
try {
    String format = "HH:mm";
    if (date.contains("-")) {
        format = "yyyy-MM-dd HH:mm:ss";
    SimpleDateFormat dateForamt = new SimpleDateFormat(format);
    currentDate = dateForamt.parse(date);
...
longmillisecondOf(int year, int month, int day)
millisecond Of
return millisecondOf(year, month, day, 0, 0);
longmillisecondOf(int year, int month, int day, int hour, int minute)
millisecond Of
try {
    SimpleDateFormat format = new SimpleDateFormat(
            "yyyy-MM-dd mm:ss", Locale.getDefault());
    Date date = format.parse("" + year + "-" + (month + 1) + "-"
            + day + " " + hour + ":" + minute);
    return date.getTime();
} catch (ParseException e) {
    android.util.Log.e("DateTimeUtil#millisecondOf", e
...