sorting data by months in access 2000

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to sort data in a query which contains the months of the year. I
am only able to sort it alphabetically and not by the monthly sequence.
 
Try to adjust below sql code to yr situation in a query

(note: i've used simple aliases)

SELECT MyTable.MyDateField, Year([Mydatefield]) AS a,
Month([mydatefield]) AS b,
Day([mydatefield]) AS c
FROM MyTable
ORDER BY Year([Mydatefield]), Month([mydatefield]), Day([mydatefield]);

Krgrds,
Perry
 

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

Back
Top