Convert input in hour-minute-second format to time

as_hms(x)

Arguments

x

Input variable

Value

Time variable of class Period

Examples

as_hms("12:45:00")
#> [1] "12H 45M 0S"
if (FALSE) {
as_hms("12:45:00") %>% hour()
as_hms("12:45:00") %>% second()
}