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))
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))