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

Sort a month

P: n/a
Hello all,
I need help for sort date("Table"). How can I sort a month, then year?
Thanks in advance,
Catherine

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Create a query into this table.

In the Field row in query design, enter:
Month([Field1])
in one column, and then:
Year([Field1])
in the next, replacing Field1 with the name of your date field.

Choose Ascending in the Sorting row of the query design grid.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Katarina" <ka********@ptt.yu> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Hello all,
I need help for sort date("Table"). How can I sort a month, then year?
Thanks in advance,
Catherine

Nov 13 '05 #2

P: n/a
Thank you very much for answers, Allen. That's it. :)
Yet, I have a question. How can I join(connect) a month and year during
sorting a month?
example:
05/05
01/05
10/05

and would be like:
01/05
05/05
10/05

How?
Thanks.

Nov 13 '05 #3

P: n/a
I don't understand this question.

If you want to sort by year and then by month, swap the order of the columns
in query design.

If you want to combine the two values, you could use:
Format([Field1], "mm\/yy")
though that will be less efficient.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Katarina" <ka********@ptt.yu> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
Thank you very much for answers, Allen. That's it. :)
Yet, I have a question. How can I join(connect) a month and year during
sorting a month?
example:
05/05
01/05
10/05

and would be like:
01/05
05/05
10/05

How?
Thanks.

Nov 13 '05 #4

P: n/a
Thank you, Allen! This is a answer which I want to do. :)
Best regards,
Catherine.

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.