add new row with Data to an existing Table based on the existing column value for datetime

I have a table as below

ID Code Date
111 IN 2024-10-09 11:00:00 AM
111 OU 2024-10-10 01:00:00 AM

I want it

ID Code Date
111 IN 2024-10-09 11:00:00 AM
111 OU 2024-10-10 11:59:00 AM
111 IN 2024-10-10

12:03:00 AM|
|111|OU|2024-10-10 01:03 00 AM|

Could you explain the logic of how the output should be produced? Also the format of the output is unclear. The data in the box below is formatted differently than the data above.
output

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.