Дата сортировки, которая хранится в виде текстового типа
Hello I want to sort Date which was stored as Text Type. It looks like "11/23/2016" I need sql command to sort using this field IncorpDate is stored as Text Type not Date Type, "11/23/2016" sqlString = "SELECT * FROM CustomerTable ORDER BY cast(IncorpDate as DATETIME) Asc" it is not working I tried the following sqlString = "SELECT * FROM CustomerTable ORDER BY Convert(DATETIME, IncorpDate, 101) Asc" it is not working. It generates an error message which is "Undefined Function "Convert" in expression. Please help Thank you in advance.
Что я уже пробовал:
sqlString = "SELECT * FROM CustomerTable ORDER BY cast(IncorpDate as DATETIME) Asc"
sqlString = "SELECT * FROM CustomerTable ORDER BY Convert(DATETIME, IncorpDate, 101) Asc"