toLocalDateTime

@JvmName(name = "toLocalDateTimeFromTLong")
fun <T> Convert<T, Long?>.toLocalDateTime(zone: TimeZone = defaultTimeZone): DataFrame<T>

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

For more information: See convert on the documentation website.

Examples:

df.convert { timestamp }.toLocalDateTime()

Return

A new DataFrame with the values converted to LocalDateTime.

Parameters

zone

The TimeZone used to interpret the Long timestamp as a time. Defaults to the system current time zone.


@JvmName(name = "toLocalDateTimeFromTDeprecatedInstant")
fun <T> Convert<T, Instant?>.toLocalDateTime(zone: TimeZone = defaultTimeZone): DataFrame<T>

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

For more information: See convert on the documentation website.

Examples:

df.convert { timestamp }.toLocalDateTime()

Return

A new DataFrame with the values converted to LocalDateTime.

Parameters

zone

The TimeZone used to interpret the kotlinx.datetime.Instant timestamp as a time. Defaults to the system current time zone.


@JvmName(name = "toLocalDateTimeFromTStdlibInstant")
fun <T> Convert<T, Instant?>.toLocalDateTime(zone: TimeZone = defaultTimeZone): DataFrame<T>

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

For more information: See convert on the documentation website.

Examples:

df.convert { timestamp }.toLocalDateTime()

Return

A new DataFrame with the values converted to LocalDateTime.

Parameters

zone

The TimeZone used to interpret the kotlin.time.Instant timestamp as a time. Defaults to the system current time zone.


@JvmName(name = "toLocalDateTimeFromTInt")
fun <T> Convert<T, Int?>.toLocalDateTime(zone: TimeZone = defaultTimeZone): DataFrame<T>

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

For more information: See convert on the documentation website.

Examples:

df.convert { timestamp }.toLocalDateTime()

Return

A new DataFrame with the values converted to LocalDateTime.

Parameters

zone

The TimeZone used to interpret the Int timestamp as a time. Defaults to the system current time zone.


fun <T> Convert<T, String?>.toLocalDateTime(format: DateTimeFormat<LocalDateTime>? = null): DataFrame<T>

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

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

For more information: See convert on the documentation website.

Examples:

df.convert { timestamp }.toLocalTime()

Return

A new DataFrame with the values converted to LocalDateTime.

Parameters

format

An optional DateTimeFormat to use when parsing. If null, the defaults will be used.


@FormatStringsInDatetimeFormats
fun <T> Convert<T, String?>.toLocalDateTime(pattern: String): DataFrame<T>

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

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

For more information: See convert on the documentation website.

Examples:

df.convert { timestamp }.toLocalTime()

Return

A new DataFrame with the values converted to LocalDateTime.

Parameters

pattern

An optional date pattern to use for parsing.


@JvmName(name = "toLocalDateTimeFromDateTimeComponents")
fun <T> Convert<T, DateTimeComponents?>.toLocalDateTime(): DataFrame<T>

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

For more information: See convert on the documentation website.

Return

A new DataFrame with the values converted to LocalDateTime.


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

For more information: See convert on the documentation website.

Examples:

df.convert { timestamp }.toLocalTime()

Return

A new DataFrame with the values converted to LocalDateTime.


fun <T> Convert<T, String?>.toLocalDateTime(pattern: String? = null, locale: Locale?): DataFrame<T>

Deprecated (with error)

We no longer accept `Locale` in String -> Kotlin date-time conversion functions, as we now directly parse to Kotlin. If you need to specify a locale to make it work, convert to Java-based types first. Will be ERROR in 1.0.

Replace with

this.toJavaLocalDateTime(pattern, locale)