-2

How can I output a date minus 3 hours? Example:

BookDate = 8/4/2014 9:00:00 PM
DesirebleDate = 8/4/2014 6:00:00 PM

Tried DesirebleDate = DateDiff("h", BookDate , -3) but it is outputing the amount of hours. Thanks.

Khrys
  • 2,670
  • 9
  • 49
  • 82
  • Possible duplicate of [How to add or plus times to NOW()](http://stackoverflow.com/questions/30507437/how-to-add-or-plus-times-to-now) – user692942 May 23 '16 at 18:03

1 Answers1

6
DesirableDate = DateAdd("h", -3, BookDate)

Should set DesirableDate to 3 hours earlier than BookDate. DateDiff gives the difference between two dates, which is why you are getting the 3...

Dave
  • 4,328
  • 2
  • 24
  • 33