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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formula in Running Total - year between 1 - 9999 error

Status
Not open for further replies.

cboulier

Programmer
Feb 23, 2011
2
US
In Crystal 8.5 I created a formula to concatenate date fields I have available to create a "real" date field:

DateSerial ({demographics.dem_high_school_grad_year},{demographics.dem_high_school_grad_month},1)

This formula appears to work and give me a good date field (example: 3/1/2007)

I am then using a formula in a running total to find students who graduated in the past 12 months:

DateDiff ("d", {rpt_generic.date_2},{@HS Grad Date}) <= 365

The formula checks out but when I try to preview I get the "Dates must be between year 1 and 9999" error and it opens my original DateSerial formula.

It's been frustrating because that DateSerial formula seems to work until I use it in the running total formula so I am reaching out for help, thank!



 
Can one or both fields in the initial formula be null? If they can be, what would you like to happen?

-LB
 
I suppose they could be on rare occasions (although they should not be).

If they were Null then I would just want them to default to a date in time that would not interfere with the calculation like '1/1/1900'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top