Avatar of spaced45
spaced45
Flag for United States of America asked on

Make time using event offsets in sql or excel

Shift and events
Above is an image of a table containing events occuing during a shift. I have a start time and an end time for the shift but I am trying to convert the fields "StartOffset" and "StopOffset" into time. I've used some contacts along with the floor function to create time but that off set represented minutes from midnight (0 = 12:00:00 AM). I thought I could maybe use the same approach but instead using the ShiftStartTime as my floored time. Didnt work. Any assistance with this would be much appreciated.
Microsoft SQL ServerMicrosoft ExcelSQL

Avatar of undefined
Last Comment
spaced45

8/22/2022 - Mon
Saqib Husain

If this is one-time then you can follow the following steps.

Enter a value 1440 in any blank cell
Select the cell
Ctrl-c
select the start and stop data (without headers)
paste-special with "Divide" option
OK
Select shift start data (without headers)
Ctrl-c
select the start and stop data (without headers)
paste-special with "Add" option
OK
ASKER CERTIFIED SOLUTION
Saqib Husain

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
spaced45

ASKER
Worked Great!
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck