mercredi 22 avril 2015

Date and Time formatting from sqlite database

I have formatted the timepicker and Datepicker data into the following formats hh:mm AM/PM and dd/MM/yyyy, and stored both the variables into sqlite database.

Now, in another activity I need to retrieve these values from the database, and pass a pendingintent alarm through alarmmanager.

My problem is that I am getting these values in the activity from database, but I can't figure out how to compare these values to current calendar time, and pass the pendingIntent like cal.getTimeInMillis().

I tried using SimpleDateFormat, but it catches ParseException: Unparseable Date

Can someone help me out with this problem? Thanks in advance

Aucun commentaire:

Enregistrer un commentaire