Sql Server string to date conversion

后端 未结 14 941
执笔经年
执笔经年 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:59

    Personally if your dealing with arbitrary or totally off the wall formats, provided you know what they are ahead of time or are going to be then simply use regexp to pull the sections of the date you want and form a valid date/datetime component.

提交回复
热议问题