Top "Simpledateformat" questions

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

How to convert string into Time object in Java?

I have String value of 08:03:10 pm, and I want to convert it into time. How can I do this in …

java date datetime simpledateformat
Unable to parse DateTime-string with AM/PM marker

The string I want to format looks like this: String datetime = "9/1/10 11:34:35 AM" Following pattern for SimpleDateFormat works: SimpleDateFormat sdf = SimpleDateFormat("…

java simpledateformat
Java SimpleDateFormat Timezone offset with minute separated by colon

How can I get my date formatted as 2012-11-25T23:50:56.193+01:00 using SimpleDateFormat? If I use Z in the format …

java simpledateformat
Why does parsing '23:00 PM' with SimpleDateFormat("hh:mm aa") return 11 a.m.?

Why does parsing '23:00 PM' with SimpleDateFormat("hh:mm aa") return 11 a.m.?

java datetime simpledateformat
Optional parts in SimpleDateFormat

I'm reading in date strings that could be with or without a time zone adjustment: yyyyMMddHHmmssz or yyyyMMddHHmmss. When a …

java datetime localization simpledateformat
Remove Leading "0" in day of month SimpleDateFormat

Is it possible to remove the "0" in January 04, 2012? I am currently using the following Java to get the date format …

java android date simpledateformat
Converting from Milliseconds to UTC Time in Java

I'm trying to convert a millisecond time (milliseconds since Jan 1 1970) to a time in UTC in Java. I've seen a …

java date datetime simpledateformat
Difference between hh:mm a and HH:mm a

Here is my original code- String dateString = "23 Dec 2015 1:4 PM"; Locale locale = new Locale("en_US"); SimpleDateFormat formatter = new SimpleDateFormat("dd …

java date simpledateformat jdk1.6
Java date parsing with microsecond or nanosecond accuracy

According to the SimpleDateFormat class documentation, Java does not support time granularity above milliseconds in its date patterns. So, a …

java simpledateformat milliseconds
Using Alphabetic Characters in SimpleDateFormat Pattern String

Is it possible to include an alphabetic character in a SimpleDateFormat Pattern String? I am trying to create a format …

java datetime formatting simpledateformat