Page 1 of 1
Invalid Argument
Posted: Fri Jul 11, 2008 9:25 am
by AngeldelaNoche
__I am trying to create a calculated field:____IIF(OETHTERM = "T1", ADDDAYS(OETHIDATE,30), IIF(OETHTERM = "T2", ADDDAYS(OETHIDATE,10), IIF(OETHTERM = "T3", ADDDAYS(OETHIDATE,60), IIF(OETHTERM = "T4", ADDDAYS(OETHIDATE,90), ""))))____When I go to save it, it tells me "Invalid Argument". I hope I am just missing something real simple here.____
=> RE: Invalid Argument
Posted: Mon Jul 14, 2008 9:30 am
by kfleming
In an IIF both the true and the false return values need to be of the same data type.____The true return value of each of your IIF^s is a date since ADDDAYS returns a date.__So your final default value of an empty string needs to be changed to a date field such as {01/01/2008} or date().__Or you could leave the empty string and surround all of the ADDDAYS with the DTOC function.____Kathleen__R&R Support