Back to Exposed

Date

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

1.2.02.9 KB
Original Source

Date

@JvmName(name = "LocalDateDateFunction")

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

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


@JvmName(name = "LocalDateTimeDateFunction")

fun <T : LocalDateTime?> Date(expr: Expression<T>): Function<LocalDate>

Represents an SQL function that extracts the date part from a given datetime expr.


@JvmName(name = "InstantDateFunction")

fun <T : Instant?> Date(expr: Expression<T>): Function<LocalDate>


@JvmName(name = "OffsetDateTimeDateFunction")

fun <T : OffsetDateTime?> Date(expr: Expression<T>): Function<LocalDate>

Represents an SQL function that extracts the date part from a given timestampWithTimeZone expr.


@JvmName(name = "XInstantDateFunction")

fun <T : Instant?> Date(expr: Expression<T>): Function<LocalDate>

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
Date(expr)

Content copied to clipboard

Represents an SQL function that extracts the date part from a given timestamp expr.

Generated by Dokka © 2026 Copyright