SELECT
CONVERT (
datetime,
SUBSTRING (intotime, 1, 8) + ' ' + SUBSTRING (intotime, 9, 2) + ':' + SUBSTRING (intotime, 11, 2)
)
FROM
table
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/184634.html原文链接:https://javaforall.net
sqlserver日期转字符串 yyyymmddhhmmss_sql中将date转换为字符串SELECT CONVERT( datetime, SUBSTRING(intotime,1,8)+”+SUBSTRING(intotime,9,2)+’:’+SUBSTRING(intotime,11,2) )FROM table
SELECT
CONVERT (
datetime,
SUBSTRING (intotime, 1, 8) + ' ' + SUBSTRING (intotime, 9, 2) + ':' + SUBSTRING (intotime, 11, 2)
)
FROM
table
发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/184634.html原文链接:https://javaforall.net