Top "Simpledateformat" questions

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

Displaying AM and PM in lower case after date formatting

After formatting a datetime, the time displays AM or PM in upper case, but I want it in lower case …

java datetime simpledateformat
How can I get yesterday's date without using Calendar in Java and without a timestamp just the date?

I have wrote a method to get the current date in the format of yyyy-MM-dd and want to be able …

java date date-format simpledateformat
SimpleDateFormat is not parsing the milliseconds correctly

Background: In my database table, I have two timestamps timeStamp1 = 2011-08-23 14:57:26.662 timeStamp2 = 2011-08-23 14:57:26.9 When I do an "ORDER …

java date simpledateformat
SimpleDateFormat ignoring month when parsing

The following code is giving me the parsed date as "Wed Jan 13 00:00:00 EST 2010" instead of "Wed Jun 13 00:00:00 EST 2010". Any ideas …

java simpledateformat
Java time since the epoch

In Java, how can I print out the time since the epoch given in seconds and nanoseconds in the following …

java time simpledateformat epoch
SimpleDateFormat String

I have this code block where argument to dateFormat.format will always be a string thats why I did .toString() …

java simpledateformat
Why SimpleDateFormat("MM/dd/yyyy") parses date to 10/20/20128?

I have this code: DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy"); dateFormat.setLenient(false); Date date = dateFormat.parse("10/20/20128"); and I …

java date simpledateformat date-parsing
Java SimpleDateFormat pattern for W3C XML dates with timezone

I am trying to parse a W3C XML Schema date like the following "2012-05-15T07:08:09+03:00" which complies with …

java date simpledateformat iso8601
SimpleDateFormat producing wrong date time when parsing "YYYY-MM-dd HH:mm"

I am trying to parse a String (YYYY-MM-dd HH:mm) to Date, however getting wrong date than expected. CODE: Date …

java datetime simpledateformat datetime-parsing
String-Date conversion with nanoseconds

I've been struggling for a while with this piece of code for an Android app and I can't get the …

java android simpledateformat datetime-format date-parsing