Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 varchar to date
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

1 Posts

Posted - 08/04/2011 :  04:14:03  Show Profile  Reply with Quote
hello i m using sql server 2008 i am having a problem with one of my column . i have a coulumn date_created which have data type of varchar(10)
when i use this coulmn in any where condition it does not give proper result . i.e if i use date<date_created , it doesnt identify the value in date_created .
how can i convert this varchar data type to date .

waiting for reply

In (Som, Ni, Yak)

17689 Posts

Posted - 08/04/2011 :  04:45:30  Show Profile  Reply with Quote
you can use CONVERT() or CAST() to convert to date. Depending on the date format in string, you specify the style accordingly.

Refer to this

Time is always against us

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000