DateAdd question

A

azu_daioh

Im trying to get all the files with any time posted 3 hours earlier
than the current time. I'm using the DateAdd but it does not return
files


DateAdd("h", -3, Date)

So if Date = 06/28/07 04:50pm I want the code to return any files
dated on or before 06/28/07 01:50pm


but for some reason the DateAdd above does not return any files. even
if I have files dated befire 06/28/07 04:50


ref:
.PropertyTests.Add Name:="Last Modified", _
Condition:=msoConditionOnOrBefore, _
Value:=DateAdd("h", -3, Date), _

I could make the code work if I use "d" instead of "h"
I tried changind Date to Time but still no result

I checked the online help and this newsgroup and still couldnt figure
out why I'm not getting any result



Thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

DateAdd question 2
Previous Week Ending Date 2
Time difference 5
DateAdd Function in Queries 2
DateAdd Funtion Nightmare 9
This should be simple but I don't know how! 6
DateAdd thought 3
DateAdd Calculation? 5

Top