Avatar of finance_teacher
finance_teacher
 asked on

Microsoft SQL 2005 -- datetime, remove 1 hour ?

Below "[DateTime] - 1" gets the database
record's value and removes one day,
therefore 2015-08-07 11:47:06.000
becomes 2015-08-06 11:47:06.000

How can I change
to remove one hour instead,
therefore 2015-08-07 11:47:06.000
becomes 2015-08-07 10:47:06.000 ?

============================================

SELECT [ID]
      ,[DateTime] - 1
      ,[Type]
      ,[BadgeID]
FROM ...........
Microsoft SQL Server 2005Microsoft SQL ServerDatabases

Avatar of undefined
Last Comment
ste5an

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
ste5an

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23