date ordering issue

llaman

New Member
Joined
Jul 14, 2004
Messages
37
I have queries reformating a date column with

"MonthYear: Format([entrydate],"mm") & Format([entrdate]. "yyyy")
ordered by ascending

The problem is that when I run the query, it orders the dates as
1/2003
1/2004
2/2003
2/2003
3/2003
3/2004
...

Do you know how to fix this?

Thanks in advance
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Hi,

I can't seem to do this using formatting techniques and I'm not good with VB but I did get it to work by creating another column in your query, like this :

MonthYear2: Format([entrydate],"yyyy") & "/" & Format([entrydate],"mm")

then remove the sorting from your first column, sort by this new column and then untick the "Show" box on this new column.

HTH, Andrew. :)
 
Upvote 0
I think that solution will get us by tomorrow, but does anyone know of possibly a better more permanent solution that will not require different formatting or an extra column?
 
Upvote 0

Forum statistics

Threads
1,221,827
Messages
6,162,200
Members
451,753
Latest member
freddocp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top