Top "Simpledateformat" questions

SimpleDateFormat is a concrete Java class for formatting and parsing dates and times in a locale-sensitive manner.

How to add minutes to my Date

I have this date object: SimpleDateFormat df = new SimpleDateFormat("yyyy-mm-dd HH:mm"); Date d1 = df.parse(interviewList.get(37).getTime()); value …

java date calendar simpledateformat java.util.date
SimpleDateFormat and locale based format string

I'm trying to format a date in Java in different ways based on the given locale. For instance I want …

java date locale simpledateformat
Java String to Date object of the format "yyyy-mm-dd HH:mm:ss"

I need to convert a String containing date into an date object. The String will be of the format "yyyy-mm-dd …

java string date simpledateformat
How to convert date in to yyyy-MM-dd Format?

Sat Dec 01 00:00:00 GMT 2012 I have to convert above date into below format 2012-12-01 How can i? i have tried …

java date simpledateformat date-formatting
Is there a date format to display the day of the week in java?

I know of date formats such as "yyyy-mm-dd" -which displays date in format 2011-02-26 "yyyy-MMM-dd"-which displays date in …

java date simpledateformat date-formatting
How to convert an Instant to a date format?

I can convert a java.util.Date to a java.time.Instant (Java 8 and later) this way: Calendar cal = Calendar.…

java date datetime java-8 simpledateformat
How to format date string in java?

Hi i have the following string:2012-05-20T09:00:00.000Z and i want to format it to be like 20/05/2012, 9am …

java date datetime simpledateformat
How do you format the day of the month to say "11th", "21st" or "23rd" (ordinal indicator)?

I know this will give me the day of the month as a number (11, 21, 23): SimpleDateFormat formatDayOfMonth = new SimpleDateFormat("d"); But …

java date simpledateformat ordinal
Why is Java's SimpleDateFormat not thread-safe?

Please tell with a code example why is SimpleDateFormat not threadsafe. What is the problem in this class? Is The …

java thread-safety simpledateformat
How to parse month full form string using DateFormat in Java?

I tried this: DateFormat fmt = new SimpleDateFormat("MMMM dd, yyyy"); Date d = fmt.parse("June 27, 2007"); error: Exception in thread "main" …

java simpledateformat