Hello i am new in android. Can anybody help me to find how i get date format Sun 15th July from 2012-07-15? I found examples but each of it is for various different date-formats. Please help me to find this.
Asked
Active
Viewed 250 times
0
-
Take a look at this thread. http://stackoverflow.com/questions/454315/how-do-you-format-date-and-time-in-android – mhan Jul 11 '12 at 10:40
-
Whatever format you want, [SimpleDateFormat](http://developer.android.com/reference/java/text/SimpleDateFormat.html) is the class. – Paresh Mayani Jul 11 '12 at 10:53
1 Answers
1
try to get idea from my another answer in [Convert Date time in “April 6th, 2012 ” format][1]
[1]: Convert Date time in "April 6th, 2012 " format here you can only change the April to Sun and 2012 to month.
Like:-
DateFormatSymbols symbols = new DateFormatSymbols();
symbols.setShortWeekdays(new String[]{"Sun","Mon"....});
SimpleDateFormat format = new SimpleDateFormat("EE", symbols);
from this code you will get Days in "Sun,Mon,Tue..." Short Format
So pass this symbols in your SimpleDateFormat class.