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