About 1,280,000 results
Open links in new tab
  1. How to get the current time in YYYY-MM-DD …

    Sep 22, 2009 · The question and the accepted answer use java.util.Date and SimpleDateFormat which was the correct thing to do in 2009. In Mar 2014, the java.util date-time API and their …

  2. java - What are the date formats available in SimpleDateFormat …

    Oct 8, 2012 · Can anybody let me know about the date formats available in SimpleDateFormat class. I have gone through api but could not find a satisfactory answer.Any help is highly …

  3. Converting ISO 8601-compliant String to java.util.Date

    Feb 5, 2010 · Unfortunately, the time zone formats available to SimpleDateFormat (Java 6 and earlier) are not ISO 8601 compliant. SimpleDateFormat understands time zone strings like …

  4. java - How to convert a String to a Date using SimpleDateFormat ...

    Sep 13, 2015 · FYI, the troublesome old date-time classes such as java.util.Date, java.util.Calendar, and java.text.SimpleDateFormat are now legacy, supplanted by the …

  5. Get Date Object In UTC format in Java - Stack Overflow

    I have written following code. I want to get Date object in UTC format. I am able to get expected date string in UTC using SimpleDateFormat. But using same SimpleDateFormat object, I am …

  6. java - how to format date using SimpleDateFormat - Stack Overflow

    Feb 16, 2012 · What are you trying to do exactly? Why can't you use the SimpleDateFormat to parse the Date too. More importantly, why aren't you using the new Java 8 DateTime API??

  7. java - Display current time in 12 hour format with AM/PM - Stack …

    Apr 27, 2015 · Currently the time displayed as 13:35 PM However I want to display as 12 hour format with AM/PM, i.e 1:35 PM instead of 13:35 PM The current code is as below private …

  8. java - SimpleDateFormat and locale based format string - Stack …

    Nov 2, 2009 · The month part works OK if I add the locale to the SimpleDateFormat constructor, but what about the rest? I was hoping I could add format strings paired with locales to …

  9. How can I change the date format in Java? - Stack Overflow

    Aug 12, 2010 · About java.time The java.time framework is built into Java 8 and later. These classes supplant the troublesome old legacy date-time classes such as java.util.Date, …

  10. simpledateformat - Java date parsing with microsecond or …

    May 9, 2015 · SimpleDateFormat, and the related java.util.Date /.Calendar classes are now outmoded by the new java.time package found in Java 8 (Tutorial). The new java.time classes …