Sorting dates (1 Viewer)

littlej

Registered User.
Local time
Today, 00:38
Joined
Jun 21, 2000
Messages
23
I am working on a chart in Access to produce a product by month. I have formatted the date to read chronologically like this: Jan, Feb Mar, Apr, May...and so on. The query works fine. It is the graph that takes the data and sorts it alphabetically...for instance Apr, Aug Dec Feb Jan July Jun. I would like to keep the mmm format. There has to be a simple fix. Can anyone help?

Thanks
 
Last edited:

Rob.Mills

Registered User.
Local time
Yesterday, 19:38
Joined
Aug 29, 2002
Messages
871
Do you actually have a date in this field or does it just have the month's name?
 

littlej

Registered User.
Local time
Today, 00:38
Joined
Jun 21, 2000
Messages
23
I formatted an date using the Format([event_date], "mmm").
 

Rob.Mills

Registered User.
Local time
Yesterday, 19:38
Joined
Aug 29, 2002
Messages
871
Well then if it's a date then use this function instead:

DatePart("m",[Field Name])

This will give you the numeric equivalent of the month and that will sort correctly.
 

littlej

Registered User.
Local time
Today, 00:38
Joined
Jun 21, 2000
Messages
23
I can sort numerically without a problem. I had tried the date part and it works but not the way I needed it to. The graph contains a lot of numbers already and sorting month by number would be confusing. I need the text part.

Thanks for the suggestion though.
 

Users who are viewing this thread

Top Bottom