MySQL DATETIME - Change only the date

后端 未结 6 1098
执笔经年
执笔经年 2020-12-28 17:03

Starting with : 2011-01-17 09:30:00

Let\'s say I want to edit just the date with 2011-01-28

What is the most efficient way to end up with: 2011-01-28 09:30:0

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-28 17:37

    You can add various components of a date to modify it using the Date_Add function. Check this out:

    http://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-add

提交回复
热议问题