SyntaxFix
Write A Post
Hire A Developer
Questions
Below should work.
SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy"); Date oldDate = df.parse(df.format(date)); //this date is your old date object