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

Max Number of days b/w dates in one column

Status
Not open for further replies.

DelmarDawg

Programmer
Nov 18, 2002
9
US
I am trying to find the number of days of treatment. To do this, I need to find the difference between the earliest and latest date in the "date of service" column. It is easy enough when they are in different columns, but I am running into issues when I use the same column(and I have to). Does anybody have an idea?
 
If this doesn't resolve, try sharing some sample data, report layout and expected output.

There are a few ways to approach this, here's one approach:

Maximum ({MyTable.DateOfService}, {MyTable.MyGroupField})-Minimum ({MyTable.DateOfService}, {MyTable.MyGroupField})

Where {MyTable.MyGroupField} would be the group level (if you have one).

Another means is to use Running Total fields, one for minimum and one for maximum.

Then just subtract them.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top