addJavaDateTimePattern
Adds a Java-based date-time pattern to the global parser options of DataFrame.
DataFrame will attempt to parse Strings using your provided patterns first before falling back to the default (ISO) formats.
For example, to always allow DataFrame to parse "12/24 2023" Strings:
DataFrame.parser.addJavaDateTimePattern<java.time.LocalDate>("MM/dd yyyy")
// or
DataFrame.parser.addJavaDateTimePattern("MM/dd yyyy")Content copied to clipboard
NOTE: Patterns provided to global parser options will be ignored for function calls provided with custom DateTimeParserOptions.dateTimeFormats.
For more information: See Parsing Date-time Strings on the documentation website.
Parameters
pattern
the date-time pattern to add.
formatType
the expected java date-time type of the pattern. If null, the pattern will be attempted for JavaLocalDateTime, JavaLocalDate, JavaLocalTime, and JavaInstant.