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

ORDER BY Date inc. year

Status
Not open for further replies.

oliverreade

Programmer
Mar 12, 2002
10
0
0
GB
Hi all,

For example when using the ORDER BY date statement. The results come back in day order only.

An example of the date format I am using is:

dd/mm/yy

02/12/06

will come before 01/03/07.

Any help will be appreciated.
 
Your date must be in a "text" data type or it would order correctly.

Try converting the text field to a date field and then ordering. I believe CDate will convert if it is in a valid date format in the text field. That is the simpliest if it will work ie. text field has a valid date format.

Order by CDate(yourtextdate)
 
cmmrfrds yes.

others. read cmmrfrds

MichaelRed
m.red@att.net

There is never time to do it right but there is always time to do it over
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top