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!

Time Range check

Status
Not open for further replies.

ImArchimedes

Technical User
Sep 25, 2007
62
Is there a way to check if a given time is within a time range? Furthermore, is there a way to check if one time range, at any point, overlaps another time range? I don't need to extract when it overlaps. I'm just looking to track conflicts for work being done.

Example:
10:00am - 1:00pm
check against
8:30am - 11:00am

result: CONFLICT

Any help would be appreciated. Thanks guys.
 
If you sort by start date and then by end date, you could compare using a formula like this:

if {table.enddatetime} > next({table.startdatetime}) then
"Conflict"

If you were doing this within some group, you would need to add a clause like this before the "then":

and if {table.groupfield} = next({table.groupfield})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top