Table Design - Date Sort Order

B

Bridget Stacy

How do I format a Month field in order for the data to
come out in Month order (ie - Jan, Feb, Mar, etc.).

I am exporting the table with this information into Excel
and creating a Pivot Table. The month field will go
across the table in columns. If I use "1/2003, 2/2003,
etc." - 1/2003 and 10/2003 are next to each other. If I
use "Jan, Feb, Mar, etc." they come out in alphabetical
order. How can I get the columns to come out in Month
order?
 
T

Tim Ferguson

If I use "1/2003, 2/2003,
etc." - 1/2003 and 10/2003 are next to each other. If I
use "Jan, Feb, Mar, etc." they come out in alphabetical
order. How can I get the columns to come out in Month
order?

Put in the leading zeroes. Unless you have proper numbers or proper dates
then sorting can only happen alphabetically. You have a number of choices:

- export the actual date: you can get Excel to format it to mm/yyyy later

- format the date to something that will sort properly: yyyy/mm is an
obvious choice

- sort on the actual date but don't make the field visible (i.e. mark it
Hidden in the query grid)

- ignore the order in the exported query and get Excel to sort it later.

There's probably more possibilities but that should be enough to get you
started.

All the best


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top