Help with creating EZM to flag overlapping time

Overlapping EZM.zip (1010.3 KB)

Hello,

I was hoping that someone could help me with creating an EZM that would identify overlapping timecard shifts between two systems.

Our company has one website where employees enter their timecards, and another website that I import that time into for processing payroll.

I’ve attached a work-in-progress EZM that I created to check for overlaps. It imports two spreadsheets:

  1. Timecard_Data_Detailed_Report - This is the timecard data entered by employees.
  2. Time Management - This is data from the website that I import timesheet into from spreadsheet #1.

From the Timecard_Data_Detailed_Report, I want to do two overlapping checks:

  1. Overlaps with Self- Identify if an employee has overlapping time with another shift from the same report.
  2. Overlaps with Time Management- identify if an employee has overlapping time with a shift that’s already in Time Management.

I don’t need to know if one employee’s shift overlaps with another employee’s shift, only if an employee has overlapping time with themselves in either system. The Employee number column is the column to use for identifying the employee. There is also a Project Code column to identify the type of work being done and a client ID column to identify who the work was done for.

In the attached EZM, I’ve formatted the two reports so that the dates and times match in the Formatting tab. I have a blank Overlapping tab where I would do these overlapping checks, but I’m not sure where to start.

See attached an example how to detect overlaps using the "Interval merge" action. The idea is to test whether the start or end of one interval falls into another interval for the same person (on the same date, project, etc). Notice that the start and end of each interval must be numbers (or number timestamps), not text values.

period-overlaps.morph (4.8 KB)

2 Likes

Thanks a bunch for the information!

You're welcome :slight_smile:

I was reading this thread and found it interesting, because I haven’t dealt with this exact scenario before and an easymorph solve didn’t immediately come to mind.

Out of curiosity, what would be an Easymorphic approach to handling the hour/minute/AM/PM time stamps in this scenario? It is separate from the date, but looks like it does not easily convert. I tried concatenating it with the date value but was still having trouble the date/time detection work when attempting to convert to a numeric date time value.

I would make it a decimal timestamp. For instance:

09:35PM -> 2135

Decimal timestamps are not continuous, but work well for detecting overlapping periods.