> Hi,
>
> I want to get the difference in 2 date fields stored in a table. Dates in the table can be stored as .NULL. To use this in a report, I have defined 2 variables and used "iif((timesheet.t1out =.NULL.), 0, timesheet.t1out)" to make sure either the variable is 0 or contains a valid date. But when I print the variable, I keep getting .NULL. printed and not 0.
>
> Could you please tell me how to do this?
>
> Thanks in advance,
>
> Thanks,
> with regards,
> Chandru.0 is not a valid date either and if you try to subtract this from a date you should be getting an error. Use {} instead of 0. You may also want to use the NVL() function instead of IIF().
-BP
www.peisch.com