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 …

  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 …

  3. 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 …

  4. 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 …

  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 - 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 …

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

  8. java - Date format Mapping to JSON Jackson - Stack Overflow

    Sep 17, 2012 · These days you should no longer use the Date class. java.time, the modern Java date and time API, has replaced it nearly 5 years ago. Use it and FasterXML/jackson-modules …

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

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

    Feb 5, 2010 · This function can convert ISO8601 format to Java Date which can handle the offset values. As per the definition of ISO 8601 the offset can be mentioned in different formats.