I am new on MySQL and I don't know how to solve this
I have a table that contains datetime type. The coloumn's format is yyyy-mm-dd hh:mm:ss
, like this 2015-12-02 20:21:54
. I want to remove the second.
If the second <= 30
then remove the second
2015-12-02 20:00:15 ---> 2015-12-02 20:00
If the second > 30
then minute + 1
2015-12-02 20:21:54 ---> 2015-12-02 20:22
Does anyone know how to make query like this?