I have a table containing webpage 'hits' and timestamps associated daily cumulative hits. Using a 24-hour clock, I want to calculate the "grossed up" hits. For example: hits of 10,000 for 2020-07-13 10:10 is 10,000 hits for 10 hours and 10 minutes, or 610 minutes. Grossing the 10k based on 24 hrs = 1440 / timestamp minutes. 1440 / 610 = 2.36. Grossed up hits = 23,607
I tried a calculating datepart but got SQL error: datetime2 incompatible with int.
Would CAST help? I'm not that versed on manipulating date values.
Thanks!