Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 23rd, 2004, 03:21 AM
pb21 pb21 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 pb21 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
calculating week numbers

I have a qry that returns the number of bookings on any particular day excluding saturday and sundays.

[date] [Num_of Bookings] [Day of week]

04/04/04 10 Monday
05/04/04 5 Tuesday
06/04/04 6 Wednesday
07/04/04 0 Thursday
08/04/04 3 Friday

11/04/04 10 Monday
12/04/04 7 Tuesday
13/04/04 3 Wednesday
14/04/04 2 Thursday
15/04/04 1 Friday


What I would like is a 4th Column titled week number that will allow me to attach the week number (it could be any number) so that I can group on week. ie the first set of dates here 4th to the 8th would show lets say week 1 and then the second set of dates 11th to 15th would show week 2. unless I can extract the natural week number of that week during the year.

04/04/04 10 Monday 1
05/04/04 5 Tuesday 1
06/04/04 6 Wednesday 1
07/04/04 0 Thursday 1
08/04/04 3 Friday 1

11/04/04 10 Monday 2
12/04/04 7 Tuesday 2
13/04/04 3 Wednesday 2
14/04/04 2 Thursday 2
15/04/04 1 Friday 2

I would then be able to create a new query to get the sum of booking for each week by grouping on the week number column.

Many regards in advance.

Peter

Reply With Quote
  #2  
Old August 24th, 2004, 05:02 AM
pb21 pb21 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 pb21 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have successfully completed this task with the datediff function

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > calculating week numbers


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway