SQL Server Management Studio 2005
How to change the column datatype from Varchar to Datetime in SQL Server Management Studio 2005
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Iftikar HussainPosted Aug 20, 2013, 7:08 AM
if it is 1 then it is valid otherwise invalid
Regards,
Iftikar
Iftikar HussainPosted Aug 20, 2013, 7:07 AM
If you want convert the column where there is data exist, then make sure all the column value is valid datetime, otherwise it will give error while changing the column type.
Regards,
Iftikar
Parthiban BPosted Aug 20, 2013, 7:05 AM
"Conversion failed when converting datetime from character string."
Sanjeeb LenkaPosted Aug 20, 2013, 7:01 AM
ALTER TABLE dbo.SampleTable
ALTER COLUMN columnname DATETIME
GO