Thread: [Solved] Using DateDif Function
View Single Post
 
Old 03-13-2014, 06:32 AM
OTPM OTPM is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Apr 2011
Location: West Midlands
Posts: 981
OTPM is on a distinguished road
Default Using DateDif Function

Hi
I am struggling with a DateDif function. I want to be able to identify those tasks that are scheduled to finish within 3 days of the current date. Here is what I have tried so far:

IIf(Date()-[Finish]>"0" And Date()-[Finish]<="3","TRUE","FALSE")

IIf(DateDif("d",[Finish],Date())>"0" AND DateDif("d",[Finish],Date())<="3","TRUE","FALSE")

However neither works. I am sure I am close but cant see the issue.

Any help appreciated.

Thanks
Tony
Reply With Quote