Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何转换
yyyymmddhhmm
至
yyyy-mm-dd hh:mm:ss.uuu
在 SQL Server 2008 中?
您要检索以插入数据库吗?
无论如何,您可以通过 CONVERT() 函数进行更改和转换
试试这个代码
SELECT CONVERT(datetime, Update_Date , 126) FROM Tbl_TEST
以供参考
http://www.petefreitag.com/item/687.cfm
http://www.sqlusa.com/bestpractices/datetimeconversion/