Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

calculate due date 1

Status
Not open for further replies.

DLynnTX

IS-IT--Management
Dec 9, 2004
67
US
I am sorry to have to post this. I have searched and can't seem to find what I need. I have a Referral Due date and a Referral Received date. I want to add 14 days to whichever date is later as the Due date. This is what I have in my query. What am I doing wrong?

DueDate: IIf([RefEffDate]>[RefReceiptDate],Format([RefEffDate]+14),Format([RefReceiptDate]+14))

I have two records that I'm testing. One has 09/27/2007 for RefEffDate and 09/29/2007 for the RefReceiptDate. The other has the reverse. Both records show 10/13/2007 as the DueDate. It puts the true value in even if it is false.
Thank you for your help.
 
Nevermind... that's a DUH... and I'm way to tired to be doing this.
 





Hi,

Why are you using the Format function to return a DATE?

The Format function returns a STRING.
[tt]
DueDate: IIf([RefEffDate]>[RefReceiptDate],[RefEffDate]+14,[RefReceiptDate]+14)
[/tt]


Skip,

[glasses] When a diminutive clarvoyant had disappeared from detention, headlines read...
Small Medium at Large[tongue]
 
Thank you, I made that change. Found the format info on TT and didn't really realize what it was doing or that it would work without it. Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top