Sql Server string to date conversion

后端 未结 14 734
执笔经年
执笔经年 2020-11-22 09:18

I want to convert a string like this:

\'10/15/2008 10:06:32 PM\'

into the equivalent DATETIME value in Sql Server.

In Oracle, I wou

14条回答
  •  死守一世寂寞
    2020-11-22 09:45

    why not try

    select convert(date,'10/15/2011 00:00:00',104) as [MM/dd/YYYY]
    

    date formats can be found at SQL Server Helper > SQL Server Date Formats

提交回复
热议问题