android - How can I do the Inserted date subtract Current date? -


i trying subtract inserted date , current date. inserted date in format dd/mm/yyyy in sqlite.

here coding

calendar today = calendar.getinstance();     string indate = eventlistadapter.key_date;     dateformat formatter ;      date insertdate ;      formatter = new simpledateformat("dd/mm/yyyy");     insertdate = formatter.parse(indate);      long diff = insertdate.gettime() - today.gettimeinmillis();     dayleft = (int) (diff / (24 * 60 * 60 * 1000)); 

the insertdate taken sqlite.

and there still error in problem there.

description resource    path    location    type unhandled exception type parseexception {my project path}line 46    java problem 


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -