Here is my code:
String de = (String) session.getAttribute("licvalid"); DateFormat df = new SimpleDateFormat("yyyy/MM/dd"); Date d=new Date(); out.println(d); Date toDt; int oneDay = 24*60*60*1000; toDt = df.parse(de); long diff = (toDt.getTime() - d.getTime())/oneDay; out.println(diff);
**I tried this to get the difference between the two dates. But, it is showing error at the line where i performed parsing operation. Please help me. Thanks**
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.