日期:2014-05-18 浏览次数:20584 次
declare @dt varchar(20) set @dt='20111108132831' select convert(datetime,stuff(stuff(STUFF(@dt,9,0,' '),12,0,':'),15,0,':')) /* ----------------------- 2011-11-08 13:28:31.000 (1 行受影响) */
------解决方案--------------------
select convert(datetime,stuff(stuff(STUFF(orderdate,9,0,' '),12,0,':'),15,0,':')) from tb