Hi Shi Jia,
The easiest way is to use the datetrunc function to truncate the time.
You can check out this thread for the formula used to bin the time into respective interval: How to change time to 5 minute intervals?
Hope this helps.
Thanks for the thread! It was very helpful !