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
Post a Comment