Back to Exposed

Second

docs/api/exposed-kotlin-datetime/org.jetbrains.exposed.v1.datetime/-second.html

1.2.03.4 KB
Original Source

Second

@JvmName(name = "LocalDateSecondFunction")

fun <T : LocalDate?> Second(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the second field from a given date expr.


@JvmName(name = "LocalDateTimeSecondFunction")

fun <T : LocalDateTime?> Second(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the second field from a given datetime expr.


@JvmName(name = "InstantSecondFunction")

fun <T : Instant?> Second(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the second field from a given timestamp expr.


@JvmName(name = "OffsetDateTimeSecondFunction")

fun <T : OffsetDateTime?> Second(expr: Expression<T>): Function<Int>

Represents an SQL function that extracts the second field from a given timestampWithTimeZone expr.


@JvmName(name = "XInstantSecondFunction")

fun <T : Instant?> Second(expr: Expression<T>): Function<Int>

Deprecated

Deprecated due to usage of old kotlinx.datetime.Instant. The change caused by deprecation of Instant in the kotlinx.datetime (see more on https://github.com/Kotlin/kotlinx-datetime?tab=readme-ov-file#deprecation-of-instant)

Replace with

kotlin
Second(expr)

Content copied to clipboard

Represents an SQL function that extracts the second field from a given timestamp expr.

Generated by Dokka © 2026 Copyright