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

Latest Date Formula

Status
Not open for further replies.

BlurredVision

Technical User
Aug 6, 2001
326
GB
Hi Guys/Gals... I am having trouble with a formula.. I can't seem to figure this one out :(

I have the following information.

JOB NAME DATE/TIME
ES521 1/20/2004 05:00:00
ES521 1/21/2004 05:30:00
ES521 1/22/2004 06:30:00
APO 1/18/2004 05:30:00
APO 1/20/2004 05:30:00
AP0 1/22/2004 05:40:00
APO 1/22/2004 06:40:00

First, I need to get the maximum date time that ES521 was posted.. Here it would be 1/22/2004 06:30:00

Here's where I am having trouble. Next I need to see when the APO was last posted, it has to be after ES521 was last posted. So in this example, I want to display 1/22/2004


Any ideas? Thanks for any help given.

Brian
 
Have you tried the "whileprintingrecords"?
somewhat wordy but here goes
Initialize:
whileprintingrecords ;
datetimevar lDate := datetime('1/1/1900 12:00:00')

Increment:
whileprintingrecords ; datetimevar LDate ; stringvar POname ;
if ({TimeDate} > lDate) then
(LDate := {TimeDate} ;
POName := {PO} )

Print POname:
whileprintingrecords ; stringvar POname ;

Print Date:
whileprintingrecords ; datetimevar lDate ;

Note that each of the "while---" is a separate formula

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top