By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
 429,423 Members | 1,601 Online
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,423 IT Pros & Developers. It's quick & easy.

# DateDiff -1 problem

 P: n/a I have two date fields: InitialDate InspDate I've tried to use a Datediff expression within an IIF function (see below) in an unbound textbox to give me the amount of days elapsed between InitialDate and current date: - after 6 days have elapsed from the InitialDate and - only if the InspDate field is empty. But, if the InspDate field is populated, then there would be a blank field in the unbound text box. The expression that I tried to use is: =IIf(IsNull([InspDate]),DateDiff("d",[InitialDate],Date())>6,"") The result is that it does recognize the 6 days elapsed but it expresses it as -1. It does not give me the actual number of days elapsed. And if the days elapsed is within 6 days difference, it produces a result of zero. please help. Nov 13 '05 #1
Share this Question
1 Reply

 P: n/a =IIf(IsNull([InspDate]) and DateDiff("d",[InitialDate],Date())>6, DateDiff("d",[InitialDate],Date()),"") Pete "John T." wrote in message news:42***********************@news.optusnet.com.a u...I have two date fields: InitialDate InspDate I've tried to use a Datediff expression within an IIF function (see below) in an unbound textbox to give me the amount of days elapsed between InitialDate and current date: - after 6 days have elapsed from the InitialDate and - only if the InspDate field is empty. But, if the InspDate field is populated, then there would be a blank field in the unbound text box. The expression that I tried to use is: =IIf(IsNull([InspDate]),DateDiff("d",[InitialDate],Date())>6,"") The result is that it does recognize the 6 days elapsed but it expresses it as -1. It does not give me the actual number of days elapsed. And if the days elapsed is within 6 days difference, it produces a result of zero. please help. Nov 13 '05 #2

### This discussion thread is closed

Replies have been disabled for this discussion.