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

Selecting maximum date

Status
Not open for further replies.

mmhmark

MIS
Joined
Jan 22, 2004
Messages
3
Location
US
I have four different date fields for each record and need to select the greatest date.

Date 1: 03/21/01
Date 2: 01/01/01
Date 3: 02/20/01
Date 4: 01/30/01

Formula would select 03/21/01
 
Try:

datevar array MyDates := [{table.date1},{Table.date2},{table.date3},{Table.date4}];
maximum(MyDates)

-k
 
It worked but I had to use dateTimeVar.

Thanks for the quick response
 
Makes sense if you had a datetimevar, note that your example data was a type date, not datetime.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top