I have a table like below and I am working on a PeriOp application that calculate the total minutes a room is utilized.
There are three shifts in day with the first shift being 07:00-15:30
The field Turn around time calculates the difference in minutes from Out Time of the previous Records and the In Time of the next Record. For Example the third row In time is 14:46 and the Out time of the Second Row is 13:28 therefore 14:46 - 13:28 = 78 minutes of Turn around time which is recorded in the third row.
In Room Time
Turn Around Time
The issue that I am having and hoping that someone can help me with, is that according to Operating Logic, The first Record of the First Shift (in this case 2nd record in the table) Should have a turn around time of 0. Instead the table is calculating the Turn Around Time from the Third Shift which is incorrect.
I need an output table to show the following ( Second row, which is the first record in the First shift should have a Turn Around Time of 0).