Issue with IIF statement
-
- Posts: 4
- Joined: Tue Oct 10, 2017 12:44 pm
Issue with IIF statement
I am going against a FoxPro database and having the following issue with the IIF statement I am trying to use.____IIF(ENTRYTIME>{01/01/2003},ENTRYTIME,ORD_DATE)____When I try to verify I get a message "Invalid Argument"____I am only using one table in this report.__ENTRYTIME is a Date/Time Field__ORD_DATE is a Date Field____If I change both of these arguments; (true argument) ENTRYTIME and (false argument) ORD_DATE to literal string it works but doesn^t give me the info I want.____Any ideas how I can make this work??____Arnold
=> RE: Issue with IIF statement
Create a calculated field called entrydate with expression:__CTOD(Word(DTTOC(entrytime),1))__This returns a date field in place of the date/time.____Then use the calculation:__IIF(ENTRYDATE>{01/01/2003},ENTRYDATE,ORD_DATE)____Since everything is now the same date datetype you should be ok.____Kathleen__R&R Support
-
- Posts: 4
- Joined: Tue Oct 10, 2017 12:44 pm
==> RE: Issue with IIF statement
Kathleen____Thank you for your answer.____Arnold