Top "Datetimeformatter" questions

For questions specific to the `DateTimeFormatter` class of java.

java.util.date to String using DateTimeFormatter

How can I convert a java.util.Date to String using DateTimeFormatter dateTimeFormatter = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ss") The Date …

java datetime java-8 jodatime datetimeformatter
How to convert "2020-12-20T00:00:00.000Z" to java.util.Date?

I tried to use DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.ENGLISH); LocalDate date = LocalDate.parse(d.toString(), …

java date localdate datetime-parsing datetimeformatter
Parsing a date using DateTimeFormatter ofPattern

I'm trying to parse a string containing a date and time using the java.time.format.DateTimeFormatter (my ultimate goal …

java parsing datetime-format date-parsing datetimeformatter
What is the equivalent format string of DateTimeFormatter.ISO_OFFSET_DATE_TIME?

Do we know if there is an equivalent format string that outputs the same result as DateTimeFormatter.ISO_OFFSET_DATE_…

java java-8 java-time datetimeformatter
How to create proper DateTimeFormatter Pattern

I am trying to create a DateTimeFormatter object with a pattern to fit this expression of time: 2016-07-22T00:00:00.000…

java datetime format jodatime datetimeformatter
Java 8 DateTimeFormatter

I need to replace SimpleDataFormat with Java 8 DateTimeFormatter. Below is the code with SimpleDateFormat. DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); Date …

java java-8 datetimeformatter
How to format LocalDate to ISO 8601 with T and Z?

I'm trying to generate a random date and time, and convert it to the "yyyy-MM-dd'T'HH:mm:ss'Z'" format. Here is …

java datetime datetime-format localdate datetimeformatter