I'm trying to fill a variable with the current date + 2 hours.
the problem is that I want the minutes and the seconds to be 0.
What I succeeded to do is increasing the date with 2 hours (by DateAdd - see below)
But if the datetime is: 2008/01/13 18:30:19, it will change to 2008/01/13 20:30:19.
I want it to be changed to: 2008/01/13 20:00:00
This code I used so far:
declare @tempDate DateTime
declare @nextDate DateTime
set @tempDate = DATEADD(hour, 2, GetDate())