month
Returns the month of a date as a number between 1 and 12.
The accepted date types are Instant, ObjectId and Timestamp.
Example
class User(
val name: String,
val birthdate: Instant,
val birthmonth: Int? = null,
)
users.updateManyWithPipeline {
set {
User::birthmonth set User::birthdate.month
}
}Content copied to clipboard