addDateTimePattern
Deprecated (with error)
This function is deprecated in favor of `addDateTimeFormat` built on kotlinx-datetime. Alternatively, use `addJavaDateTimePattern` for Java-based parsing. Will be ERROR in 1.0.
Replace with
addDateTimeUnicodePattern<LocalDateTime>(pattern)Content copied to clipboard
Deprecated:
We recommend using addDateTimeFormat instead, built on kotlinx-datetime. This provides a good DSL.
For example:
DataFrame.parser.addDateTimeFormat(
LocalDate.Format {
monthNumber(padding = Padding.SPACE); char('/'); day(); char(' '); year()
},
)Content copied to clipboard
We do allow parsing by pattern too, but it requires an Opt-In and the exact type this pattern belongs to:
@OptIn(FormatStringsInDatetimeFormats::class)
DataFrame.parser.addDateTimeUnicodePattern<LocalDate>("MM/dd yyyy")Content copied to clipboard
If you want to keep using the Java-based date-time parsing, you can use addJavaDateTimePattern.
For more information: See Parsing Date-time Strings on the documentation website.