Hi all,
I have below Data
ID | New Date | OldStartDateTIme | oldEndDateTime |
6 | 15-11-2021 | 20-11-2021 00:15 | 20-11-2021 04:15 |
6 | 15-11-2021 | 20-11-2021 04:15 | 20-11-2021 04:45 |
6 | 15-11-2021 | 20-11-2021 04:45 | 20-11-2021 07:45 |
7 | 20-11-2021 | 18-11-2021 08:00 | 18-11-2021 14:00 |
7 | 20-11-2021 | 18-11-2021 14:00 | 18-11-2021 14:30 |
7 | 20-11-2021 | 18-11-2021 14:30 | 18-11-2021 16:30 |
8 | 14-11-2021 | 17-11-2021 00:00 | 17-11-2021 04:00 |
8 | 14-11-2021 | 17-11-2021 04:00 | 17-11-2021 04:30 |
8 | 14-11-2021 | 17-11-2021 04:30 | 17-11-2021 07:30 |
9 | 15-11-2021 | 19-11-2021 00:30 | 19-11-2021 04:30 |
9 | 15-11-2021 | 19-11-2021 04:30 | 19-11-2021 05:00 |
9 | 15-11-2021 | 19-11-2021 05:00 | 19-11-2021 08:00 |
10 | 20-11-2021 | 19-11-2021 08:00 | 19-11-2021 14:00 |
10 | 20-11-2021 | 19-11-2021 14:00 | 19-11-2021 14:30 |
10 | 20-11-2021 | 19-11-2021 14:30 | 19-11-2021 15:30 |
11 | 14-11-2021 | 20-11-2021 00:00 | 20-11-2021 04:00 |
11 | 14-11-2021 | 20-11-2021 04:00 | 20-11-2021 04:30 |
11 | 14-11-2021 | 20-11-2021 04:30 | 20-11-2021 07:30 |
12 | 19-11-2021 | 20-11-2021 23:00 | 21-11-2021 06:00 |
12 | 19-11-2021 | 21-11-2021 06:00 | 21-11-2021 06:30 |
12 | 19-11-2021 | 21-11-2021 06:30 | 21-11-2021 07:30 |
13 | 15-11-2021 | 19-11-2021 00:30 | 19-11-2021 04:30 |
13 | 15-11-2021 | 19-11-2021 04:30 | 19-11-2021 05:00 |
13 | 15-11-2021 | 19-11-2021 05:00 | 19-11-2021 08:00 |
14 | 14-11-2021 | 18-11-2021 23:15 | 19-11-2021 03:15 |
14 | 14-11-2021 | 19-11-2021 03:15 | 19-11-2021 03:45 |
14 | 14-11-2021 | 19-11-2021 03:45 | 19-11-2021 06:45 |
15 | 15-11-2021 | 19-11-2021 00:30 | 19-11-2021 04:30 |
15 | 15-11-2021 | 19-11-2021 04:30 | 19-11-2021 05:00 |
15 | 15-11-2021 | 19-11-2021 05:00 | 19-11-2021 08:00 |
The Requirement is to replace the old Dates with the new Date Column. and the duration of old dates and duration ofter the change should match..
I tried using replacing the Dates .. but the issue is for ex: for the ID : 12 , the old TIme start on 20 and end on 21, , I need that replaced with the appropriate Dates based on Old TImings.
Any workaround would be highly appreciated.
GROUP BY : ID, each ID the shift timing should fall on appropriate Start and End Dates based on the old Timings and Duration
Thank you so much:)
You've given an example of what the data is "before" the requirement, but can you show us what you want it to look like "after"? I'm not sure I understand completely.
Glad to hear, cheers!