Sorting Dates in Text Fields

J

JWeaver

I need to sort dates that are stored in Text fields. Right now, dates like
01/01/09 are sorted ahead of 12/01/08. How can I fix this without changing
the field type?
 
B

Beetle

You could create a query with a calculated field using the CDate function;

SELECT CDate([YourDateField]) AS SortedDate FROM tblYourTable
ORDER BY SortedDate;

Curious why you don't just make the field a Date/Time data type??
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top