Access query expression

C

caloy

Running a query for 6 mos of data and can't remember the expression to
aggregate volume by week, as in:

Week Ending Volume
June 1, 08 100
June 8, 08 80
June 15, 08 120

With Monday as start of week.
I am using a formula = 7-weekday [date] + [date] to get weekly summary but
need a date format to go along with it...as in the example above

Hope this is clear.
 
M

Michel Walsh

Format( 7-weekday(dateTimeStamp) + dateTimeStamp ,"mmmm dd, yyyy")



Vanderghast, Access MVP
 
C

caloy

Michel,
It returns a date but the date reads January 06, 1900. How do I fix that?
--
Caloyski


Michel Walsh said:
Format( 7-weekday(dateTimeStamp) + dateTimeStamp ,"mmmm dd, yyyy")



Vanderghast, Access MVP


caloy said:
Running a query for 6 mos of data and can't remember the expression to
aggregate volume by week, as in:

Week Ending Volume
June 1, 08 100
June 8, 08 80
June 15, 08 120

With Monday as start of week.
I am using a formula = 7-weekday [date] + [date] to get weekly summary but
need a date format to go along with it...as in the example above

Hope this is clear.
 
M

Michel Walsh

Your date-time value has a year? If not, add Year(now):


Format( 7-weekday(dateTimeStamp) + dateTimeStamp + Year(now) ,"mmmm dd,
yyyy")



or


Format( 7-weekday(dateTimeStamp) + dateTimeStamp + iif(
Year(dateTimeStamp)=0, Year(now), 0) ,"mmmm dd, yyyy")



Vanderghast, Access MVP

caloy said:
Michel,
It returns a date but the date reads January 06, 1900. How do I fix that?
--
Caloyski


Michel Walsh said:
Format( 7-weekday(dateTimeStamp) + dateTimeStamp ,"mmmm dd, yyyy")



Vanderghast, Access MVP


caloy said:
Running a query for 6 mos of data and can't remember the expression to
aggregate volume by week, as in:

Week Ending Volume
June 1, 08 100
June 8, 08 80
June 15, 08 120

With Monday as start of week.
I am using a formula = 7-weekday [date] + [date] to get weekly summary
but
need a date format to go along with it...as in the example above

Hope this is clear.
 

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