dayOfMonth

open val <R : Any> Value<R, Instant>.dayOfMonth: Value<R, Int>(source)
open val <R : Any> Field<R, Instant>.dayOfMonth: Value<R, Int>(source)
@get:JvmName(name = "dayOfMonthOfObjectId")
val <R : Any> Value<R, ObjectId>.dayOfMonth: Value<R, Int>(source)
@get:JvmName(name = "dayOfMonthOfObjectId")
val <R : Any> Field<R, ObjectId>.dayOfMonth: Value<R, Int>(source)
@get:JvmName(name = "dayOfMonthOfObjectId")
val <R : Any> KProperty1<R, ObjectId>.dayOfMonth: Value<R, Int>(source)
@get:JvmName(name = "dayOfMonthOfObjectId")
val ObjectId.dayOfMonth: Value<Any, Int>(source)
@get:JvmName(name = "dayOfMonthOfTimestamp")
val <R : Any> Value<R, Timestamp>.dayOfMonth: Value<R, Int>(source)
@get:JvmName(name = "dayOfMonthOfTimestamp")
val <R : Any> Field<R, Timestamp>.dayOfMonth: Value<R, Int>(source)
@get:JvmName(name = "dayOfMonthOfTimestamp")
val <R : Any> KProperty1<R, Timestamp>.dayOfMonth: Value<R, Int>(source)
@get:JvmName(name = "dayOfMonthOfTimestamp")
val Timestamp.dayOfMonth: Value<Any, Int>(source)

Returns the day of the month for a date as a number between 1 and 31.

The accepted date types are Instant, ObjectId and Timestamp.

Example

class User(
val name: String,
val birthdate: Instant,
val birthdayOfMonth: Int? = null,
)

users.updateManyWithPipeline {
set {
User::birthdayOfMonth set User::birthdate.dayOfMonth
}
}

External resources