How to round a DateTime in MySQL?

前端 未结 6 1244
孤城傲影
孤城傲影 2020-12-21 17:48

I want to discretize the DateTime with the resolution of 5 minutes. I did it in C#, but how to convert the following code to MySQL?

DateTime Floor(DateTime d         


        
6条回答
  •  失恋的感觉
    2020-12-21 18:23

    Have you had a look at the CAST functionality in MySQL?

    • MySQL Cast
    • Cast Functions and Operators

提交回复
热议问题