I have java.util.Date
02/26/2015
. I want to convert it like Feburary 26,2015
as String
. How can I convert it like that ??
like what goes here ??
DateFormat formatter = new SimpleDateFormat("here");
I have java.util.Date
02/26/2015
. I want to convert it like Feburary 26,2015
as String
. How can I convert it like that ??
like what goes here ??
DateFormat formatter = new SimpleDateFormat("here");
Use this format:
DateFormat formatter = new SimpleDateFormat("EEE dd,yyyy");
As descripted in the documentation of SimpleDateFormat:
E Day name in week
d Day in month
y Year
You use SimpleDateFormat
DateFormat formatter = new SimpleDateFormat("MMMM dd, yyyy");
The format above is:
MMMM Month in year,
dd Day in month,
yyyy Year,
Please read the manual for more possibilities of how to format dates properly.
SimpleDateFormat format=new SimpleDateFormat("MMMM dd, yyyy");