SELECT (CAST(YEAR([Date]) AS VARCHAR(4)) + '-' + RIGHT('00' + CAST(MONTH([Date]) AS VARCHAR(2)),2) + '-' + RIGHT('00' + CAST(DAY([Date]) AS VARCHAR(2)),2)) AS [strDate], * FROM appointment
SELECT CONVERT(DATE, CAST([Date] AS VARCHAR), 120) AS [strDate], * FROM appointment
No comments:
Post a Comment