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

Max or Min of a Date Field

Status
Not open for further replies.

NattyCat

MIS
Aug 9, 2004
38
GB
Crystal 9, SQL Server 7

I have a field {last run date} and I'm trying to display the earliest date that appears in that field.

I've used a formula:

{@min date}
minimum (database.last run date}

but this is returning blanks, even though i know I have a date of 9th feb and 14th feb in that field - and am trying to return the 9th.

Any ideas?

Nat
 
You probably have nulls in your date field. I would address this in 2 steps:

1) Test for nulls:
If Isnll({YourDateField}) then date (2099,1,1) else {YourDateField}

2) Perform a minimum of this formula field rather then the database field.



Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top