|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
I have successfully completed this task with the datediff function
|
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft Access Development > calculating week numbers |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|