MySQL DATETIME - Change only the date

后端 未结 6 1100
执笔经年
执笔经年 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条回答
  •  [愿得一人]
    2020-12-28 17:54

    Going to use something like:

    CONCAT('2011-01-28 ',DATE_FORMAT(original_timestamp, '%H:%i:%s'))
    

提交回复
热议问题