Group by part of number

K

Karen

The excel sheet that is used to import into the database uses 90601 as the
date format, which represents June 1, 2009. I would like to create a cross
tab query with column headings grouped by 0906 (for June data), 0907 (for
July data), 0908 (for August data), etc. What is the best approach?
 
V

vanderghast

You can GROUP on expressions. Here, it seems that x \ 100 does the
trick.


? 90601 \ 100 , 90731 \ 100
906 907



which assumes your 'dates' are numerical. You could also use int( x /
100) instead of x \ 100, in this case.



Vanderghast, Access MVP
 

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

Similar Threads


Top