Ask Your Question
4

How can the conversion of a String to LocalDate be unsuccessful?

asked 2021-04-18 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-08-04 20:00:00 +0000

lakamha gravatar image

The conversion of a String to LocalDate can be unsuccessful if the format of the String does not match the expected format of the LocalDate. For example, if the String is in the format "yyyy-MM-dd" but the actual String is "2021-15-28", the conversion will fail since "15" is not a valid month value. Additionally, if the String is null or empty, the conversion will also fail.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-04-18 11:00:00 +0000

Seen: 18 times

Last updated: Aug 04 '21