Sorting by date

kaledev

Registered User.
Local time
Today, 18:49
Joined
Jan 20, 2011
Messages
19
I am having an issue with a query. It is returning dates that have been formatted in mmm 'yy format, meaning Jan '11, Feb '11, and so on.

For whatever reason when sorted it relies on A-Z instead of Newest to Oldest and so on. Jan '11 is being displayed first, then Jan '10, then Feb '11, Feb '10...

I need this to be sorted like a regular date field, containing '11 data first, then '10. I tried using the Format function:

Code:
Format([Month], "yyyy-mm-dd")

And it just spits out Jan '11 again like I didn't do anything. Is there some sort of trick to sorting dates in mmm 'yy form? I have to keep them in mmm 'yy form unfortunately, otherwise I would change them all to normal dates. Thanks!
 
Try another field in your query, not shown, with the following expression sorted descending:
Code:
dateserial([month])
If that doesn't work I suspect your month field is text, not date...
 

Users who are viewing this thread

Back
Top Bottom