This function returns the hour of the given datetime value.
date_get_hour(date);
Real
myhour = date_get_hour(date_current_datetime());
This would set "myhour" to the current hour.