Reputation: 1784
How to display day and month in string format. I want to display day and date and month. Look like that
Thursday
11
April
but when I used Calender class it returns date and day in different format just like yyyy-mm-dd
Upvotes: 0
Views: 235
Reputation: 3937
SimpleDateFormat sString s= "2013-1-18";
SimpleDateFormat sdf = new SimpleDateFormat("EEEE,MMMM, dd ");
System.out.println(sdf.format(new SimpleDateFormat("yyyy-M-dd").parse(s)));
Upvotes: 1