How to convert yyyyMMddhh
(2017092018
) string to Date
in SQL Server 2012?
Is it possible to do without using T-SQL to put the sentence into the INSERT
clause?
INSERT INTO [dbo].[Table](SomeColumn)
VALUES (CONVERT(DATETIME, '2017092018', 'yyyyMMddhh'));