The title is pretty much explicit, my question is if i get two dates with hour:
Is it possible
You can do almost everything with the date/time operators:
select timestamp '2014-01-10 20:00:00' + random() * (timestamp '2014-01-20 20:00:00' - timestamp '2014-01-10 10:00:00')