View Full Version : How to reduce minute from date field


amator
08-01-2006, 01:59 AM
Hi
I want reduce one minute from my date field. My date field looks like this: 17.3.2006 3:57:00 and I want it to look like this:17.3.2006 3:55:00. I have tried to make it like this: DATEADD( minutes, -2, [StartTime]) AS NewStart. StartTime is date field. But this doesent work. Could somebody tell me how to reduce one minute from date field??

Michael J Ross
08-01-2006, 02:10 AM
Try DateAdd("n",-2,[StartTime])

You say one minute but are reducing it by two?

amator
08-01-2006, 02:58 AM
Thanks. I tried that but when I try to complete the query Access says: " Compile error. in query expression 'DateAdd("n",-2,[StartTime])' ". Any other suggestions how to get it work?
Yes I say one minute but I meaned two:)
Yes I got it work in my other database, strange that it didn't work at first. But anyway it works thanks a lot M.J Ross!