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

How to flag overlapping dates?

Status
Not open for further replies.

trixiegrrl

Programmer
Jul 31, 2008
23
US
I have this probelm and I am drawing a blank on how to resolve it. I have a report that shows University Name and From and Thru Dates attended the University. All three fields (From and Thru are separate fields) display in the details section like this example:

University of Rochester 7/1/2001-8/31/2005
UCLA 8/31/2001-9/1/2005

Since this scenario obviously cannot happen, we would like to flag such overlaps in red text. I know where to do the conditional formatting, I am just not sure which conditions to flag based upon. Any assistance you could give me to point me in the right direction would be much appreciated. Thanks!
 
If you sort ascending by From date, then you can use a formula like this:

if {table.from} < previous({table.thru}) then
cryellow else
crnocolor

-LB
 
Great, thanks! That worked, but I flagged both by doing:

if {@From Date} < previous({@Thru Date}) then
red
else if {@Thru Date} > next({@From Date}) then
red else
black
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top