core-ktx / androidx.time / java.time.LocalDateTime / component2

component2

inline operator fun LocalDateTime.component2(): LocalTime

Return the LocalTime of this LocalDateTime.

This method allows to use destructuring declarations when working with date/times, for example:

val (date, time) = myDateTime

See Also

LocalDateTime.toLocalTime