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

Help: Grouping dates in query

P: n/a
I'm building a report where each row represents one month and its 1 to
5 weeks. A report query groups the source table date into a "month and
year" expression. A subreport links to the main report using the
query's "month and year" expression.

Problem is I can't figure out how to group the source table's dates
into a "Mmmm yyyy" and then link the subreport to the relevant week of
that "Mmmm Yyyy".

source table:
tbl_Promotion
Street_Date
Promo_Name

report output:
(line 1) November 2004, [week1] promos, [week2] promos...
(line 2) December 2004, [week1] promos...
(line 3) January 2005, ...

Note that "[week#] promos" is the linked subform showing the exact
promo date from the source table.

Any help is greatly appreciated!
Nov 13 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"John" <so*********@hotmail.com> wrote in message
news:90**************************@posting.google.c om...
I'm building a report where each row represents one month and its 1 to
5 weeks. A report query groups the source table date into a "month and
year" expression. A subreport links to the main report using the
query's "month and year" expression.

Problem is I can't figure out how to group the source table's dates
into a "Mmmm yyyy" and then link the subreport to the relevant week of
that "Mmmm Yyyy".


The best way to handle these sorts of temporal problems is often to build
and populate a separate calendar table to hold all the individual time
slices you are ever likely to need - then join to this table in your
queries. This gives much better performance than grouping on a calculated
value.

If you need some help with specific syntax post your simplified table
structure with some sample data and the output you need.
Nov 13 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.