How to round up DateTime to the next whole Hour?

How to round up DateTime to the next whole Hour? The Dates docs is heavy, and a beginner can get lost in it.

using Dates

function gvt(p1)
    dly = Hour(2)     # a constant delay of 2 hours
    tym =  now()     #     HOW TO round up tym to the next whole hour ?
    #   ....
    tym = now() + dly
    #    .... 
    if now() > tym
       #  ....
julia> ceil(now(), Hour)
1 Like

Thank you. That was a very quick reply, and it works!

1 Like