Hi I'm trying to parse a string with a date in scala. I tried it the following way:
import java.time.format.DateTimeFormatter
import java.time.LocalDateTime
val date="20 October 2015"
val formatter=DateTimeFormatter.ofPattern("dd MMMM yyyy")
val dt=LocalDateTime.parse(ts,formatter)
But I get the follwing exception:
java.time.format.DateTimeParseException: Text '20 october 2015' could not be parsed at index 3
at java.time.format.DateTimeFormatter.parseResolved0(DateTimeFormatter.java:1949)
at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1851)
at java.time.LocalDateTime.parse(LocalDateTime.java:492)
... 29 elided
For parsing I used the Standard Java API's DateTimeFormatter and LocalDateTime