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

How to grab highest value only. Date conversion. 1

Status
Not open for further replies.

JetRamsey

Technical User
Oct 22, 2010
49
0
0
US
I have 8 sections in a report. Each section has it's own Created datetime field and a Modified datetime field. In section 1, I can create a formula of CurrentDateTime-{SafetyReportA.ModifiedDate}, which shows me how long it's been since this section has been updated.

To keep in simple, Section 2 is the same CurrentDateTime-{SafetyReportB.ModifiedDate} along with Sections 3 to 8.

At first, I created a formula as:
(CurrentDateTime-{SafetyReportA.ModifiedDate} + CurrentDateTime-{SafetyReportB.ModifiedDate})/2
I could have did the same for all sections and divide in by 8 instead. However, that does not reach my goal.

How can I evaluate all 8 sections and then give one correct answer of the last time the entire report was last modified. In theory, I could evaluate all 8 Modified dates and go with the lowest whole number result of CurrentDateTime-{SafetyReport?.ModifiedDate}. Is there an easy way evaluate all 8 ModifiedDate?

TIA
 
Assuming there are 8 separate modified date fields and that these are not located in subreports, you can just create a formula:

maximum([{SafetyReportA.ModifiedDate},{SafetyReportB.ModifiedDate},{SafetyReportC.ModifiedDate},{SafetyReportD.ModifiedDate},{SafetyReportE.ModifiedDate},{SafetyReportF.ModifiedDate},{SafetyReportG.ModifiedDate},{SafetyReportH.ModifiedDate}])

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top