'23.10.2016'
i want to convert this varchar type date to datetime in format yyyy-mm-dd in sql server.
when i am trying its giving error
Conversion failed when converting datetime from character string
Hi iammann,
Refer below sample query.
SQL
DECLARE @TestDate AS TABLE([Date] VARCHAR(10)) INSERT INTO @TestDate VALUES('23.10.2016') SELECT CONVERT(DATETIME,[Date],105) [Date] FROM @TestDate
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.