Update only time from my Datetime field in sql

前端 未结 8 1690
旧时难觅i
旧时难觅i 2020-12-08 14:41

I have a date 2013-12-14 05:00:00.000 in my table.

Now i want to update only time of that date. E.G to 2013-12-14 04:00:00.000

Is there any query to update o

8条回答
  •  北荒
    北荒 (楼主)
    2020-12-08 14:52

    User the below one to update the Time only for datetime column -

    select  CONVERT(varchar(10),datecolumn, 120) + ' 12:34:56', 
            CONVERT(varchar(10),datecolumn, 120) + ' 00:00:00', 
            RSLV_LTR_INITIAL_DUE_DT, *
    from twhere able1       
    

提交回复
热议问题