public long dateConvertor(String date) throws ParseException {
Date currentpastDate = null;
try {
SimpleDateFormat formatter = new SimpleDateFormat("d MMM yyyy h:mm a");
currentpastDate = (Date) formatter.parse(date);
} catch (Exception E) {
E.printStackTrace();
}
return currentpastDate.getTime();
}
No comments:
Post a Comment