Thursday, March 29, 2012

Date question

Hello everybody i do have varchar column with DD-MM-YYYY. How can i convert
it to datetime data type ?
pls let me knowDo you need to jsut convert it within a query, you can use Cast of Convert
for that.
If you need to convert the column's data type, You have two options.
1) in T-SQL add the new column, do an update to move the data over, drop the
old column, then rename the new column
2) in Enterprise Manager change the data type and it will create a script
for you.
"mvp" <mvp@.discussions.microsoft.com> wrote in message
news:BAD8F615-56DF-47EB-93A7-26A8AC5C0920@.microsoft.com...
> Hello everybody i do have varchar column with DD-MM-YYYY. How can i
> convert
> it to datetime data type ?
> pls let me know

No comments:

Post a Comment