the referenced thread should already give you an idea of how to do this, just replace the magic numbers for seconds (24*60*60 resp 24/60/60) with the magic number for hours (24) in a day.
In addition, when comparing floating point numbers (that's what you want to do when linking your hour based calendar to your timestamp), make sure that both numbers are created / rounded the same way. Please check
In order to create your calendar it is better to use numeric format than date format.
Today is day 41317. Tomorrow will be 41318. It means that 1 hour = 1/24
So your Autogenerate should be [ ($(varMaxDate) - $(varMinDate) + 1)*24 ] => number of hours between this two dates.
Then, instead of adding only => "+ RowNo()" you should add => "+ RowNo()/24".