I want to set date in format like this,
Friday, March 4, 2012 3:15 AM
yes I am know about this
SimpleDateFormat parseFormat = new SimpleDateFormat("MMMM dd,yyyy hh:mm a");
Date date =new Date();
String s = parseFormat.format(date);
but I don't know what is option to show day, please help me. Thanks!
In traditional American usage, dates are written in the month–day–year order (e.g. September 15, 2022) with a comma before and after the year if it is not at the end of a sentence, and time in 12-hour notation (6:46 am).
The international standard recommends writing the date as year, then month, then the day: YYYY-MM-DD. So if both Australians and Americans used this, they would both write the date as 2019-02-03.
In your format string, use "E" for the short name (Sun, Mon, Tue, etc), or "EEEE" for the full words (Sunday, Monday, Tuesday, etc).
Also, see here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With