Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
JAdauto
Posting Yak Master
160 Posts |
Posted - 2015-04-27 : 16:53:47
|
I need to split out the number of minutes worked for one shift, that could possibly span multiple day parts.Example: employee 1 clocks in at 9:15am and clocks out at 17:09. That is a total of 474 minutes worked.The day parts are as follows along with the allocation of how many minutes of his total shift were worked in each period:Name start end Total minutes per shiftBreakfast 4:00 10:30 75Lunch 10:30 14:00 210Snack 14:00 17:00 180Dinner 17:00 20:00 9PM Snack 20:00 22:00 0Late Night 22:00 4:00 0 474I can get the day part breakout and I can get the shift information. I just cannot figure out how to join them to get the allocation between the possible multiple shifts.Thoughts or suggestions are appreciated.Thanks,JAdauto |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2015-04-28 : 16:56:20
|
What are you expecting as output? Minutes per shift? Total minutes? Both? I would rather be the man who bought the Brooklyn Bridge than the one who sold it. -Will Rogers |
|
|
|
|
|