rip_second() extracts the seconds from a date or datetime object.

rip_second(x)

Arguments

x

<Date / POSIXct / POSIXlt>

The vector to extract the seconds from.

Value

A double vector the same size as x containing the seconds.

Examples

x <- as.POSIXct("2019-01-01 00:00:05", "UTC") rip_second(x)
#> [1] 5