I'm trying to subtract an hour from this date - 2016-08-25 1:19:30.560. I expect and want to get 2016-08-25 12:19:30.560.
Instead I get: 2016-08-25 00:19:30.560
If I then set the date to 2016-08-25 2:19:30.560. I then get 2016-08-25 01:19:30.560. It does it properly.
DECLARE @FakeCurrentDateTime1 datetime
DECLARE @FakeCurrentDateTime2 datetime
SET @FakeCurrentDateTime1 = '2016-08-25 1:19:30.560'
SET @FakeCurrentDateTime2 = DATEADD(hour, -1, @FakeCurrentDateTime1)
SELECT @FakeCurrentDateTime2
DECLARE @FakeCurrentDateTime3 datetime
DECLARE @FakeCurrentDateTime4 datetime
SET @FakeCurrentDateTime3 = '2016-08-25 2:19:30.560'
SET @FakeCurrentDateTime4 = DATEADD(hour, -1, @FakeCurrentDateTime3)
SELECT @FakeCurrentDateTime4