Sorting Format Date Function in MS Access

S

sherwinb

I haved the following expression in MS Access query based on a date field:
Format([Form Date],"mmm yy"). In this query I am doing a group by function
to count up the number of times that a field exists within a particluar
month. Basically I want to aggregate up the values for a particular month
and year.

My problem is that when I order the query by the expression Format([Form
Date],"mmm yy"), the results are not in chronological order. I wanted to
stay away from creating 2 extra columns for a Year and Month field based on
the date. Is there any way to get Format([Form Date],"mmm yy") to sort as a
true date function based on a serial number?

Thanks
 
K

KARL DEWEY

Add a field to the left of your Format([Form Date],"mmm yy") like
Format([Form Date],"yyyymm") and sort on it.
 

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