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