My SQL Server system is 2016.
As topic, I want to convert YYYYMMDD-HHMMSS to mm/dd/yyyy hh:mm:ss, and use dynamic SQL to fulfill this.
My da
Select CONVERT(VARCHAR(25) , CAST(LEFT(ID , 8) AS DATETIME), 101) + ' ' + LEFT(RIGHT(ID , 6) ,2) + ':' + SUBSTRING(RIGHT(ID , 6) , 3,2) + ':' + RIGHT(ID , 2) FROM TableName