Top "Simpledateformat" questions

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

Y returns 2012 while y returns 2011 in SimpleDateFormat

I wonder why 'Y' returns 2012 while 'y' returns 2011 in SimpleDateFormat: System.out.println(new SimpleDateFormat("Y").format(new Date())); // prints 2012 …

java date simpledateformat
Simpledateformat unparseable date

I have a String in a database (match.getDate) that has the following date format: 01/04/2018 This is the date I …

java android date simpledateformat date-parsing
Converting yyyy-mm-dd into dd mm yyyy

How to convert 2013-06-24 to 24 Jun 2013? I am using the below code. date1="2013-06-24"; SimpleDateFormat d= new SimpleDateFormat("…

android simpledateformat
Android parse String to Date - unknown pattern character 'X'

I have Service fetch date string from web and then I want to pare it to Date object. But somehow …

java android date simpledateformat
Getting pattern string from java SimpleDateFormat

I have a SimpleDateFormat object that I retrieve from some internationalization utilities. Parsing dates is all fine and good, but …

java simpledateformat
Android Format date with time zone

I need to format the date into a specific string. I used SimpleDateFormat class to format the date using the …

java android calendar google-calendar-api simpledateformat
SimpleDateFormat returns string date in different languages

Im using SimpleDateFormat to parse the correct date. Sometimes when i use SimpleDateFormat it returns the me the date in …

java android simpledateformat
java dateformat illegal pattern character 'y'

We started having a weird error on production environment recently (test environments works fine). java.lang.IllegalArgumentException: Illegal pattern character …

java locale simpledateformat
Java/Android - Convert a GMT time string to local time

Ok, so I have a string, say "Tue May 21 14:32:00 GMT 2012" I want to convert this string to local time in …

java android datetime simpledateformat
Parsing string to date: Illegal pattern character 'T'.

I need to parse a string to date in java. My string has the following format: 2014-09-17T12:00:44.0000000Z …

java string date simpledateformat