Home > Archive > MS SQL Server > December 2006 > convert









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author convert
stoney

2006-12-12, 7:12 pm

can someone give me the command to conver varchar to date please.

In my table I have varchar(50) Tue Nov 21 00:00:06 EST 2006 for the column
but need to update the colum with 2006-11-21 00:00:06.

Thanks,
Stoney
DK

2006-12-12, 7:12 pm

stoney wrote:
> can someone give me the command to conver varchar to date please.
>
> In my table I have varchar(50) Tue Nov 21 00:00:06 EST 2006 for the column
> but need to update the colum with 2006-11-21 00:00:06.
>
> Thanks,
> Stoney


Try to look up the CONVERT command in BOL. Here you can see the various
styles you can use. I think in your case you can use 20/120.

--
Regards
Steen Schlüter Persson
Database Administrator / System Administrator
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com