A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Week Ending Date



 
 
Thread Tools Display Modes
  #1  
Old November 21st, 2006, 07:28 PM posted to microsoft.public.access.queries
Baffee
external usenet poster
 
Posts: 4
Default Week Ending Date

I have a subquery that I use in a crosstab quety. The subquery takes the
billable hours for each employee for the period from 1/1/06 to 4/29/06. It
looks at the worked date (wdate) and assigns the hours together by the week
#.

To get the week number I use: DateDiff("w",1/1/06,[wdate])

The crosstab then summarizes by the week and goves me a total by Employee by
week.

Everything works great.

The problem is that the crosstoab query shows the information as:

Employee Name 0 1 2 3 4 5...
Employee A 40 42.6 37 43 56 60 (These are hours)

I would like to show the week ending date (1/7,1/14,1/21 etc) instead of the
week number.

Any suggestions in how to do this in the subquery??

Thanks!


  #2  
Old November 21st, 2006, 11:37 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Week Ending Date

Use the same method as how you arrived at the week numbers.
DateAdd("w",[YourWeekNumberField], #1/1/2006#)

"Baffee" wrote:

I have a subquery that I use in a crosstab quety. The subquery takes the
billable hours for each employee for the period from 1/1/06 to 4/29/06. It
looks at the worked date (wdate) and assigns the hours together by the week
#.

To get the week number I use: DateDiff("w",1/1/06,[wdate])

The crosstab then summarizes by the week and goves me a total by Employee by
week.

Everything works great.

The problem is that the crosstoab query shows the information as:

Employee Name 0 1 2 3 4 5...
Employee A 40 42.6 37 43 56 60 (These are hours)

I would like to show the week ending date (1/7,1/14,1/21 etc) instead of the
week number.

Any suggestions in how to do this in the subquery??

Thanks!


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:29 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.