By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,705 Members | 1,852 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,705 IT Pros & Developers. It's quick & easy.

Trouble sorting a column by month

P: n/a
I'm pretty new to using access and I can't figure out how to sort dates by
month, then day within the month, but disregard year. When I try to put into
ascending order it always uses the year.
E.g.: What It should look like normally, and does is:
01/08/1991
24/07/1984
18/03/2002
When I run a certain report it should show as:
03/18/2002
07/24/1984
08/01/1991
Is what I'm asking possible to do?

Thanks, Vince
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Thu, 12 Aug 2004 16:46:06 -0400, vinco wrote:
I'm pretty new to using access and I can't figure out how to sort dates by
month, then day within the month, but disregard year. When I try to put into
ascending order it always uses the year.
E.g.: What It should look like normally, and does is:
01/08/1991
24/07/1984
18/03/2002
When I run a certain report it should show as:
03/18/2002
07/24/1984
08/01/1991
Is what I'm asking possible to do?

Thanks, Vince


Create a new query.
Show all of the fields you wish.
Add 1 new column to the query grid.
SortMonthDay:Format([DateField],"mm/dd")
Sort this field Ascending

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2

P: n/a
"vinco" <vi***@caulfeild.com> wrote in message news:<fG*********************@news20.bellglobal.co m>...
I'm pretty new to using access and I can't figure out how to sort dates by
month, then day within the month, but disregard year. When I try to put into
ascending order it always uses the year.
E.g.: What It should look like normally, and does is:
01/08/1991
24/07/1984
18/03/2002
When I run a certain report it should show as:
03/18/2002
07/24/1984
08/01/1991
Is what I'm asking possible to do?

Thanks, Vince


So how about using the Month and Day functions to get the data you
want and sort by those.

SELECT SomeDate
FROM SomeTable
ORDER BY Month(SomeDate) ASC, Day(SomeDate) ASC;
Nov 13 '05 #3

P: n/a
Thank you! This solution was just what I was looking for.

Vince

"fredg" <fg******@example.invalid> wrote in message
news:15*****************************@40tude.net...
On Thu, 12 Aug 2004 16:46:06 -0400, vinco wrote:
I'm pretty new to using access and I can't figure out how to sort dates by month, then day within the month, but disregard year. When I try to put into ascending order it always uses the year.
E.g.: What It should look like normally, and does is:
01/08/1991
24/07/1984
18/03/2002
When I run a certain report it should show as:
03/18/2002
07/24/1984
08/01/1991
Is what I'm asking possible to do?

Thanks, Vince


Create a new query.
Show all of the fields you wish.
Add 1 new column to the query grid.
SortMonthDay:Format([DateField],"mm/dd")
Sort this field Ascending

--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.

Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.