I would like to extract the hour from a POSIXct
time in R, but retrieve the 2 digit answer.
For example,
test=as.POSIXct("2015-03-02 03:15:00")
test
[1] "2015-01-02 03:15:00 GMT"
month(testing)
[1] 1
hour(testing)
[1] 3
The results give the relevant month and hour, but I would like to see 01
and 03
instead of just 1
and 3
.