I'm using CR8.5 against an Oracle 8 DB procedure and need help with the following if possible.
Data records contain a start date and an end date(say D1 & D2), I need to include all records that have an end date that is either Null or ends within user defined period(start & finish), I then need to calculate the total of days falling within the period from each record.
I tried along the lines of:
If {D1} >= {start} and IsNull({D2}) then DateDiff("d",{D1},{finish}) etc.........
The formula returns data for records with dates within period but not for records with Null end dates or start dates prior to period start.
Any advice on where I'm going wrong? Thanks.
Data records contain a start date and an end date(say D1 & D2), I need to include all records that have an end date that is either Null or ends within user defined period(start & finish), I then need to calculate the total of days falling within the period from each record.
I tried along the lines of:
If {D1} >= {start} and IsNull({D2}) then DateDiff("d",{D1},{finish}) etc.........
The formula returns data for records with dates within period but not for records with Null end dates or start dates prior to period start.
Any advice on where I'm going wrong? Thanks.