Forum Discussion
Dynamic Indexing on Current day receiving time
Hi Experts😀,
I want to have a dyanamic index column based on recieving time of current day.
Eg. Every day i recieve 'Receieved Time' column and keeps changing everyday it might start from 5AM and next day it can be from 7 AM. Howverver i want to get index as 1 for starting hour like 5AM and 2 for next hour 6AM and so on.
Below are the reference table.
| Received Time | Required Index | Next day it might be | Required Index | |
| 5/14/2024 5:00 | 1 | 5/15/2024 7:00 | 1 | |
| 5/14/2024 6:00 | 2 | 5/15/2024 8:00 | 2 | |
| 5/14/2024 7:00 | 3 | 5/15/2024 9:00 | 3 | |
| 5/14/2024 8:00 | 4 | 5/15/2024 10:00 | 4 | |
| 5/14/2024 9:00 | 5 | 5/15/2024 11:00 | 5 | |
| 5/14/2024 10:00 | 6 | 5/15/2024 12:00 | 6 | |
| 5/14/2024 11:00 | 7 | 5/15/2024 13:00:00 PM | 7 |
- Anonymous2 years ago
Hi insandur
If you only have one day's data in this table every day, you can change the "Received Time" column to Datetime type, sort table by "Received Time" column ascendingly, then add an Index column starting from 1.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
1 Reply
- AnonymousNot applicable
Hi insandur
If you only have one day's data in this table every day, you can change the "Received Time" column to Datetime type, sort table by "Received Time" column ascendingly, then add an Index column starting from 1.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!