Cross Tab Queries

G

Guest

I created a cross tab query with date values as row headings. Access
automatically formats the dates as short date (e.g. 8/14/04) but in doing so,
the dates are not sorted properly. For example: the columns from left to
right show up as follows: 10/3/04, 8/7/04, 8/14/04, 9/12/04. So, October
shows up before August.

I went to design view, and remove the short date format for the date field.
Now, the columns are sorted properly, but the dates are now displayed as
"08/7/04 12:33:00 AM". How do I get rid of the time portion of the date as
part of the column heading?

Any help will be greatly appreciated.
 
M

MGFoster

Use the Pivot clause. E.g.:

TRANSFORM ...
SELECT ...
FROM...
WHERE ...
GROUP BY ...
ORDER BY ...
PIVOT Format(date_column, "yyyy mm dd")
 

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