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!

Sorting recordsets

Status
Not open for further replies.

EscapeUK

Programmer
Jul 7, 2000
438
GB
I have an ADODB Recordset on of the fields is a date. How do I sout the records set records into date order.
 
have you tried using an ORDER BY clause in the query? Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein


 
Something like:

Select * from (table)
Order By (field --> Date)

Good luck!
 
Unfortunatly in my DB the dates are in varchar
 
You can also sort the recordset after you have it:

rsRecordset.Sort = "FieldName"

As far as it being in varchar, you may have to convert that field to a date in your SQL statement. That way you will be returning a date and then the sort will be ok. I'm pretty sure you can convert to date in your "order by" clause as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top