I am trying to round up a timestamp to the next full 10 minutes.
I have tried below solutions but wasn't able to get my expected results
我也试了date_trunc()
次,但都不能用.
预期结果:
input | expected output |
---|---|
2023-07-01 10:00:00 | 2023-07-01 10:10:00 |
2023-07-01 10:00:01 | 2023-07-01 10:10:00 |
2023-07-01 10:01:00 | 2023-07-01 10:10:00 |
2023-07-01 10:05:00 | 2023-07-01 10:10:00 |
2023-07-01 10:09:59 | 2023-07-01 10:10:00 |