DateTimeFormatter.ofPattern("MM/dd/yyyy HH:mm:ss", Locale.US) accepts dates with exactly two places in Month and Day. For your input, DateTimeFormatter.ofPattern("M/d/yyyy HH:mm:ss", Locale.US), ResolverStyle.STRICT) is needed.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top