Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exclude null and empty dates from chart

Status
Not open for further replies.

RobHVB6Sql

Programmer
May 20, 2002
77
AU
I have created a formula to chart a set of dates by month, although the null dates show up on the chart.
What do I need to do to this formula to exclude these from the chart?

//Formula starts here
if {q1stContact-Numbers.DateOfFirstContact} < cdate('01/01/1990 0:00:0')
and IsNull({q1stContact-Numbers.DateOfFirstContact}) = false
then
{q1stContact-Numbers.DateOfFirstContact}

I have also tried the order option in the Chart Expert. Rob Hasard
Data Manager -Genetic Services
(VB6 /SQL 7.0)
 
I had a similar problem with dates and I had to use both the IsNull and Date(0,0,0) function to get mine to work. Try...

//Formula starts here
if {q1stContact-Numbers.DateOfFirstContact} < cdate('01/01/1990 0:00:0')
and IsNull({q1stContact-Numbers.DateOfFirstContact}) = false or
if {q1stContact-Numbers.DateOfFirstContact} < cdate('01/01/1990 0:00:0')
and ({q1stContact-Numbers.DateOfFirstContact}=Date(0,0,0)) = false
then
{q1stContact-Numbers.DateOfFirstContact}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top