I’ve got a String like this: 2013-04-19, and I want to change it into : April 19th 2013. I know there is some classes in Java like SimpleDateFormat, but I don’t know what kind of function I should use. Maybe I need to choose the class Pattern? I need some help.
I’ve got a String like this: 2013-04-19 , and I want to change it
Share
Try the following, which should give you correct “th”, “st”, “rd” and “nd” for days.
Which will print
April 19th 2013(Day termination adapted from this post)