Currently I have a column with time in the format yyyy-mm-dd hh:mm:ss, (eg. 2015-10-10 04:10:45) and I wish to extract the hour possibly using as.POSIXlt(x)$hour
where x is my column.
Unfortunately, this function is returning a vector full of 0's, but if I do something like as.POSIXlt("2015-10-10 04:10:45")$hour
I receive 4
which is what I want.
How can I do this with the whole column?