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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Varchar to Datetime

Status
Not open for further replies.

pcdaveh

Technical User
Sep 26, 2000
213
US
I need the syntax to change a varchar to a datetime:

I have a table that contains "Date" values and they are being stored as varchar in the table. They are in this format "mm-dd-yyyy" or "09-06-2002" I need to convert or cast it into a Date form at in a View.

The following only works in the criteria
WHERE (ENTERED = CONVERT(DATETIME, '2002-09-06 00:00:00', 102))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top