Back to Exposed

Month

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

1.2.03.3 KB
Original Source

Month

@JvmName(name = "LocalDateMonthFunction")

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

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


@JvmName(name = "LocalDateTimeMonthFunction")

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

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


@JvmName(name = "InstantMonthFunction")

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

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


@JvmName(name = "OffsetDateTimeMonthFunction")

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

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


@JvmName(name = "XInstantMonthFunction")

fun <T : Instant?> Month(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
Month(expr)

Content copied to clipboard

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

Generated by Dokka © 2026 Copyright