J
jmoore
In a calculated field of a query, I am attempting to show the following when
the field CaseCost=3. The DateDiff is calculating only on those cases where
the casecost equals 3, but it is also calculating when the field equals
1/1/7777 and 1/1/9999, instead of displaying the symbols. Thanks for any
suggestions.
1) NA when F12 AND F13 are 1/1/7777 or 1/1/9999
2) $ when F12 is not equal to either, (and therefore is a valid date) AND
F13 equals either 1/1/7777 or 1/1/9999
3) * when F13 is not equal to either, (and therefore is a valid date) AND
F12 equals either 1/1/7777 or 1/1/9999
4) Calculate the difference between two valid dates.
Level3: IIf([CaseCost]=3,IIf(([F12]=(#1/1/7777# Or #1/1/9999#) And
[F13]=(#1/1/7777# Or #1/1/9999#)),"NA",IIf(([F12]<>(#1/1/7777# Or #1/1/9999#)
And [F13]=(#1/1/7777# Or #1/1/9999#)),"$",IIf(([F13]<>(#1/1/7777# Or
#1/1/9999#) And [F12]=(#1/1/7777# Or #1/1/9999#)),"*",
DateDiff("d",[F13],[F12])))))
the field CaseCost=3. The DateDiff is calculating only on those cases where
the casecost equals 3, but it is also calculating when the field equals
1/1/7777 and 1/1/9999, instead of displaying the symbols. Thanks for any
suggestions.
1) NA when F12 AND F13 are 1/1/7777 or 1/1/9999
2) $ when F12 is not equal to either, (and therefore is a valid date) AND
F13 equals either 1/1/7777 or 1/1/9999
3) * when F13 is not equal to either, (and therefore is a valid date) AND
F12 equals either 1/1/7777 or 1/1/9999
4) Calculate the difference between two valid dates.
Level3: IIf([CaseCost]=3,IIf(([F12]=(#1/1/7777# Or #1/1/9999#) And
[F13]=(#1/1/7777# Or #1/1/9999#)),"NA",IIf(([F12]<>(#1/1/7777# Or #1/1/9999#)
And [F13]=(#1/1/7777# Or #1/1/9999#)),"$",IIf(([F13]<>(#1/1/7777# Or
#1/1/9999#) And [F12]=(#1/1/7777# Or #1/1/9999#)),"*",
DateDiff("d",[F13],[F12])))))