After looking at the docs a little bit I can't find anything equivalent to an Hour() function, so you might have to tackle this a slightly harder way...
the TO_CHAR() function will convert the datetime in to a string, then you will have to use string manipulation to extract the relevant time portions, convert these back to integers and apply the necessary math.
Hope this helps