Assuming your time were a variable "X", you can use round or trunc .

Try:

round(X, "hour") trunc(X, "hour")

This would still require some work to determine whether the values had actually been rounded up or down (for round ). So, If you don't want to have to think about that, you can consider using the "lubridate" package: