Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Converting VARCHAR to DATE

Status
Not open for further replies.

colby

Technical User
Jul 6, 2000
11
GB
I am new to SQL and have a problem converting a varchar field into date.

The data is in the form "01/01/2001", but is stored in a varchar field.

I am trying to agregate the field at the same time. But that is another problem.

What is the syntax for this?
Thanks in advance.
Dave c
 
select cast (Fld as smalldatetime)
or
select cast (Fld as datetime)

depending on precision...

Mark

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top