good morning,
i have this date as a String:
2016-05-20 00:00:00
now i would like to convert this string in a date format and to milliseconds.
i tried this:
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
Date convertedDate = new Date();
try {
convertedDate = dateFormat.parse(c1.getString(c1.getColumnIndex(DatabaseHelper.COLUMN_MHD)));
} catch (ParseException e) {
e.printStackTrace();
}
Wed Jan 20 00:00:00 MEZ 2016
but how can i convert this date now to milliseconds?