Java Date Conversion

advertisements

Possible Duplicate:
Java string to date conversion

Hi, how would I convert a string, for example "5/22/2011" into Sunday, May 22?

Thanks in advance!


Try:

Date d = new SimpleDateFormat("MM/dd/yyyy").parse("5/22/2011");
String s = new SimpleDateFormat("EEEE, MMMM dd").format(d);