toJavaLocalDate

Converts values in the columns previously selected with convert to JavaLocalDate, preserving their original names and positions within the DataFrame. Preserves null values.

Supported source types: String (parsed), Long and Int (epoch milliseconds), LocalDate, LocalDateTime, JavaLocalDateTime, StdlibInstant, DeprecatedInstant, JavaInstant.

For more information: See convert on the documentation website.

Examples:

df.convert { date }.toJavaLocalDate()
df.convert { colsOf<LocalDate?>() }.toJavaLocalDate()

Return

A new DataFrame with the values converted to JavaLocalDate.


@JvmName(name = "toJavaLocalDateFromString")
fun <T> Convert<T, String>.toJavaLocalDate(formatter: DateTimeFormatter? = null, locale: Locale? = null): DataFrame<T>

Converts values in the String columns previously selected with convert to JavaLocalDate, preserving their original names and positions within the DataFrame.

Trims each string and attempts to parse it using the specified formatter and locale. Fails with an exception if a value cannot be parsed.

For more information: See convert on the documentation website.

Return

A new DataFrame with the values converted to JavaLocalDate.

Parameters

formatter

An optional DateTimeFormatter to use for parsing. If null, default parsers are used.

locale

An optional Locale for parsing. If null, the default locale is used.


@JvmName(name = "toJavaLocalDateFromStringPattern")
fun <T> Convert<T, String>.toJavaLocalDate(pattern: String, locale: Locale? = null): DataFrame<T>

Converts values in the String columns previously selected with convert to JavaLocalDate, preserving their original names and positions within the DataFrame.

Trims each string and attempts to parse it using the specified pattern and locale. Fails with an exception if a value cannot be parsed.

For more information: See convert on the documentation website.

Return

A new DataFrame with the values converted to JavaLocalDate.

Parameters

pattern

A date pattern to use for parsing (e.g., "yyyy-MM-dd").

locale

An optional Locale for parsing. If null, the default locale is used.


@JvmName(name = "toJavaLocalDateFromStringNullable")
fun <T> Convert<T, String?>.toJavaLocalDate(formatter: DateTimeFormatter? = null, locale: Locale? = null): DataFrame<T>

Converts values in the nullable String columns previously selected with convert to JavaLocalDate, preserving their original names and positions within the DataFrame. Preserves null values.

Trims each string and attempts to parse it using the specified formatter and locale. Fails with an exception if a value cannot be parsed.

For more information: See convert on the documentation website.

Return

A new DataFrame with the values converted to JavaLocalDate.

Parameters

formatter

An optional DateTimeFormatter to use for parsing. If null, default parsers are used.

locale

An optional Locale for parsing. If null, the default locale is used.


@JvmName(name = "toJavaLocalDateFromStringNullablePattern")
fun <T> Convert<T, String?>.toJavaLocalDate(pattern: String, locale: Locale? = null): DataFrame<T>

Converts values in the nullable String columns previously selected with convert to JavaLocalDate, preserving their original names and positions within the DataFrame. Preserves null values.

Trims each string and attempts to parse it using the specified pattern and locale. Fails with an exception if a value cannot be parsed.

For more information: See convert on the documentation website.

Return

A new DataFrame with the values converted to JavaLocalDate.

Parameters

pattern

A date pattern to use for parsing (e.g., "yyyy-MM-dd").

locale

An optional Locale for parsing. If null, the default locale is used.