SyntaxFix
Write A Post
Hire A Developer
Questions
A simple tweak to Paresh's solution:
Date date = Calendar.getInstance().getTime(); SimpleDateFormat df = new SimpleDateFormat("dd-MMM-yyyy"); String formattedDate = df.format(date);