Home » Java » java – Convert string to getTimeInMillis()-Exceptionshub

java – Convert string to getTimeInMillis()-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

How to convert “dateString” to getTimeInMillis() ? I want to put getTimeInMillis() value into a AlarmManager.

SimpleDateFormat dateformatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
String dateString = dateformatter.format(new Date(now.getTimeInMillis()));
How to&Answers: