Date Sorting

C

c

Is there any way to sort ascending by date if you're using the names of the
Month (January, February, etc.) vs numbered dates (01/01/05, 02/01/05, etc.)?
When I sort ascending I get April, August, December, February...

thanks
c
 
K

Ken Snell [MVP]

Add a field to your query (uncheck its Show box) that is the date/time
field. Sort on this field.
 
J

JL

Hi c,

Do you have a year field that go with the Month filed?

If you do, then you can do this.

SELECT CDate(MonthField & YearField), OtherFileds From YourTable
Order By CDate(MonthField & YearField);

Hope this helps.
 
J

JL

Sorry, correction.

SELECT CDate(MonthField & "/" & YearField), OtherFIelds from YourTable
Order By CDate(MonthField & "/" & YearField);
 
Top