Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: Barbara Peisch
  Where is Barbara Peisch?
 Oceanside
 California - United States
 Barbara Peisch
 To: B S Chandru
  Where is B S Chandru?
 Bangalore
 India
 B S Chandru
Subject: RE: Issue using NULL in reports...
Thread ID: 95828 Message ID: 95877 # Views: 1 # Ratings: 1
Version: Visual FoxPro 6 Category: Reports and Printers
Date: Friday, May 12, 2006 7:44:58 PM         
   



> 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

ENTIRE THREAD

Issue using NULL in reports... Posted by B S Chandru @ 5/12/2006 4:33:14 PM
RE: Issue using NULL in reports... Posted by Foxhound @ 5/12/2006 4:47:20 PM
RE: Issue using NULL in reports... Posted by B S Chandru @ 5/12/2006 5:22:19 PM
RE: Issue using NULL in reports... Posted by Ken Murphy @ 5/12/2006 6:02:48 PM
RE: Issue using NULL in reports... Posted by B S Chandru @ 5/12/2006 7:10:31 PM
RE: Issue using NULL in reports... Posted by Ken Murphy @ 5/12/2006 7:19:20 PM
RE: Issue using NULL in reports... Posted by B S Chandru @ 5/12/2006 7:32:25 PM
RE: Issue using NULL in reports... Posted by Ken Murphy @ 5/12/2006 9:22:09 PM
RE: Issue using NULL in reports... Posted by B S Chandru @ 5/15/2006 7:58:13 AM
RE: Issue using NULL in reports... Posted by Foxhound @ 5/12/2006 6:18:34 PM
RE: Issue using NULL in reports... Posted by B S Chandru @ 5/12/2006 7:11:51 PM
RE: Issue using NULL in reports... Posted by Ken Murphy @ 5/12/2006 4:52:44 PM
RE: Issue using NULL in reports... Posted by Koen Piller @ 5/12/2006 5:09:32 PM
RE: Issue using NULL in reports... Posted by B S Chandru @ 5/12/2006 5:24:01 PM
RE: Issue using NULL in reports... Posted by Barbara Peisch @ 5/12/2006 7:44:58 PM
RE: Issue using NULL in reports... Posted by B S Chandru @ 5/12/2006 7:50:45 PM