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 ...........
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 ...........
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.