如题,表有个字段存放的是 日期字符串比如 20150131201159 我要填充datatable前 希望把该字段的字符串解析成
2015-01-31 20:11:59 像这样如何实现?
------解决思路----------------------
select SUBSTRING('20150131201159',1,4)+'-'+SUBSTRING('20150131201159',5,2)
+'-'+SUBSTRING('20150131201159',7,2) + ' '
+SUBSTRING('20150131201159',9,2)+':'+SUBSTRING('20150131201159',11,2)+':'+SUBSTRING('20150131201159',13,2)