Current Dataset:
DateTime | Incidents |
2022-01-03 00:00:00 | 0 |
2022-01-03 00:30:00 | 0 |
2022-01-03 01:00:00 | 2 |
2022-01-03 01:30:00 | 1 |
2022-01-03 02:00:00 | 4 |
2022-01-03 02:30:00 | 5 |
2022-01-03 03:00:00 | 1 |
2022-01-03 03:30:00 | 2 |
2022-01-03 04:00:00 | 0 |
2022-01-03 04:30:00 | 2 |
Desired Outcome with a total of 48 periods in a day, 30 minutes interval from 12am to 12am:
DateTime | Incidents | Period | Period Number |
2022-01-03 | 0 | 12am to 12.30am | 1 |
2022-01-03 | 0 | 12.30am to 1am | 2 |
2022-01-03 | 2 | 1am to 1.30am | 3 |
2022-01-03 | 1 | 1.30am to 2am | 4 |
2022-01-03 | 4 | 2am to 2.30am | 5 |
2022-01-03 | 5 | 2.30am to 3am | 6 |
2022-01-03 | 1 | 3am to 3.30am | 7 |
2022-01-03 | 2 | 3.30am to 4.00am | 8 |
2022-01-03 | 0 | 4am to 4.30am | 9 |
2022-01-03 | 2 | 4.30am to 5am | 10 |
@Amol_Telore thanks Amol.
However, for the Period Number, it is not meant to be a Record ID. It is to signify the period in a simpler way (e.g. 00:00AM to 00:30AM) is 1, the highest will be 48. The number will restart to 1 when it is a new time period (e.g. 00:00AM to 00:30AM).