0

I have retrieved date from contact database and the value is 1990-04-07 that is yy-MM-dd . How to format the date to 07th April 1990

Please suggest me ....

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
  • The "th" part is a bit tricky - SimpleDateFormat doesn't handle that. Have a look at this: http://stackoverflow.com/questions/4011075/how-do-you-format-the-day-of-the-month-to-say-11th-21st-or-23rd-in-java – Ken Wolf Nov 29 '13 at 16:47
  • Please read this question and answers, it may be useful for you [enter link description here][1] [1]: http://stackoverflow.com/questions/10316827/convert-date-time-in-april-6th-2012-format – Simon Xu Nov 29 '13 at 16:53

1 Answers1

0

Check out the Android Developer page for DateFormat: Android Developer Page

What you're looking for is DateFormat.getDateTimeInstance() in the example they provide.

Xarus
  • 6,589
  • 4
  • 15
  • 22