- Very first step to convert date into milliseconds (ms)
- String date1 = "01-02-2015 09:15:20";
- SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
- HH convert into 24 hours format (0-23)
- hh convert into 12 hours format
- Date d1 = format.parse(date1);
- long ms = d1.getTime();
No comments:
Post a Comment