This should handle having nothing in the field, and something similar should probably be included in all
Select Case constructs, to handle the unexpected:
- Select Case DateDiff("D", Shipdt, Date)
-
Case Is > 90
-
WTAge = "GT-90"
-
Case Is > 60
-
WTAge = "61-90"
-
Case Is > 30
-
WTAge = "31-60"
-
Case Is < 31
-
WTAge = "LT-31"
-
Case Else
-
WTAge = ""
- End Select
And please refrain from using an existing thread to post a separate question. Your question about
DateDiff() has nothing to do with the original thread. Doing this is known as "thread hijacking" and against the rules, both here and on most technical forums.
I've moved it to its own thread.
Linq
;0)>
Moderator