Page 1 of 1

Issue with IIF statement

Posted: Sun Aug 10, 2003 4:47 pm
by Arnold_Dubin_(Guest)
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

Posted: Mon Aug 11, 2003 8:07 am
by kfleming
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

==> RE: Issue with IIF statement

Posted: Fri Aug 15, 2003 7:22 am
by Arnold_Dubin_(Guest)
Kathleen____Thank you for your answer.____Arnold