how to convert date to a format `mm/dd/yyyy`

后端 未结 4 1181
我寻月下人不归
我寻月下人不归 2020-12-09 02:32

I\'m having a sql table with date column named CREATED_TS which holds the dates in different format eg. as shown below

Feb 20 2012          


        
4条回答
  •  攒了一身酷
    2020-12-09 03:09

    Use:

    select convert(nvarchar(10), CREATED_TS, 101)
    

    or

    select format(cast(CREATED_TS as date), 'MM/dd/yyyy') -- MySQL 3.23 and above
    

提交回复
热议问题