About 474,000 results
Open links in new tab
  1. Change date format in a Java string - Stack Overflow

    Jan 18, 2011 · The modern Date-Time API is based on ISO 8601 and thus the toString implementation of java.time types return a string in ISO 8601 format. Your desired format is the default format of …

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

    Aug 12, 2010 · Using java.time Parse the input string as a date-time object, then generate a new String object in the desired format. The LocalDate class represents a date-only value without time-of-day …

  3. java - What are the date formats available in SimpleDateFormat class ...

    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 appreciated.

  4. date - How to get the current time in YYYY-MM-DD …

    Sep 22, 2009 · Use the answers that use java.time, the modern Java date and time API, and its ZonedDateTime and DateTimeFormatter classes. The SimpleDateFormat class used in many of the …

  5. Convert java.util.Date to String - Stack Overflow

    I want to convert a java.util.Date object to a String in Java. The format is 2010-05-30 22:15:52

  6. Java date format - including additional characters

    FYI, the terribly troublesome date-time classes such as java.util.Date, java.util.Calendar, and java.text.SimpleDateFormat are now legacy, supplanted by the java.time classes built into Java 8 …

  7. How to format date string in java? - Stack Overflow

    Jun 15, 2012 · Parse String to Date with Different Format in Java (10 answers) Illegal pattern character 'T' when parsing a date string to java.util.Date (4 answers) Android Studio Convert ISO string to …

  8. java.util.Date format conversion yyyy-mm-dd to mm-dd-yyyy

    Aug 28, 2013 · The other Answers use troublesome old legacy date-time classes, now supplanted by the java.time classes. If you have a java.util.Date, convert to a Instant object.

  9. java - What is this date format? 2011-08-12T20:17:46.384Z - Stack …

    Instant.parse ( "2011-08-12T20:17:46.384Z" ) ISO 8601 This format is defined by the sensible practical standard, ISO 8601. The T separates the date portion from the time-of-day portion. The Z on the end …

  10. java - How to correctly create a date with a specific format? - Stack ...

    May 26, 2015 · I have the following doubt related how to create a format date in Java. In a Java application I have to create a date (the value have to be the current date) formatted in this way: 2015 …