473,804 Members | 4,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Calculating week numbers from dates in other fields

I recently built a database to help keep track of shipments we are
bringing into the country.

Included in the database are a number of fields with dates for
shipment, ETA etc. Each one of these is accompanied by a "week no"
relating to the week in the calendar year (I am sure many people are
familiar with working with week nos and know what I mean).

Currently the users have to refer to wall calendars which have the
week nos listed on them and manually enter it into the appropriate
field.

Is there any way in which I can have this value calculated
automatically by Access so all the user has to do is enter the date in
the date field and the week no field automatically fills itself in?
It would save us a lot of time....

Many thanks
Simon
Nov 12 '05 #1
2 7626
I'd use this in an update query. Change the field of [Invoice Date] to
whatever you need but be sure to change it in both parts of this expression.

DateDiff("ww",D ateSerial(Year([Invoice Date]),1,1),[Invoice Date],1,1)

If this is just based of todays date, that is the day you enter it then
set this as a default in your table and change the formula to

DateDiff("ww",D ateSerial(Year( Date()),1,1),Da te(),1,1)

--
Dean Covey
www.coveyaccounting.com

MS-Office Certified:
http://www.microsoft.com/learning/mc...st/default.asp

"Simon Pleasants" <pl*****@hotmai l.com> wrote in message
news:61******** *************** *********@4ax.c om...
I recently built a database to help keep track of shipments we are
bringing into the country.

Included in the database are a number of fields with dates for
shipment, ETA etc. Each one of these is accompanied by a "week no"
relating to the week in the calendar year (I am sure many people are
familiar with working with week nos and know what I mean).

Currently the users have to refer to wall calendars which have the
week nos listed on them and manually enter it into the appropriate
field.

Is there any way in which I can have this value calculated
automatically by Access so all the user has to do is enter the date in
the date field and the week no field automatically fills itself in?
It would save us a lot of time....

Many thanks
Simon

Nov 12 '05 #2
Hi Simon,

I was looking at Stehen Lebans "Month Calendar" earlier today and noticed
that it includes weeknumbers.
http://www.lebans.com/monthcalendar.htm

If that doesn't suit you, try
Format([YourDateField], "ww")

--
HTH,
Don
=============== ==============
Use My*****@Telus.N et for e-mail
Disclaimer:
Professional PartsPerson
Amateur Database Programmer {:o)

I'm an Access97 user, so all posted code
samples are also Access97- based
unless otherwise noted.

Do Until SinksIn = True
File/Save, <slam fingers in desk drawer>
Loop

=============== =============== ==
"Simon Pleasants" <pl*****@hotmai l.com> wrote in message
news:61******** *************** *********@4ax.c om...
I recently built a database to help keep track of shipments we are
bringing into the country.

Included in the database are a number of fields with dates for
shipment, ETA etc. Each one of these is accompanied by a "week no"
relating to the week in the calendar year (I am sure many people are
familiar with working with week nos and know what I mean).

Currently the users have to refer to wall calendars which have the
week nos listed on them and manually enter it into the appropriate
field.

Is there any way in which I can have this value calculated
automatically by Access so all the user has to do is enter the date in
the date field and the week no field automatically fills itself in?
It would save us a lot of time....

Many thanks
Simon

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5227
by: androtech | last post by:
Hello, I'm looking for a function that returns a date range for a specified week number of the year. I'm not able to find functions like this anywhere. Any pointers/help would be much appreciated. TIA
4
1772
by: Dr John Stockton | last post by:
Throughout the world in general, ISO 8601 Week Numbers are used, in which weeks are numbered 01 upwards and Week 01 contains the first Thursday of the Gregorian Calendar Year. There are, however, odd parts of the world where that standard is not followed. Ignoring for the moment cases in which week 1 is not more-or-less at the beginning of the calendar year, what other definitions, stated exactly, are used?
4
22697
by: Mark | last post by:
Hi I have been trying to convert the week number to a range of dates that I can use. It should be fairly simple for you guru's out there but for us mere mortals it is beyond our grasp. I know that there are different start days of the week so I would presume any function would provide that facility. Hope you can help Mark
2
2045
by: Simon Pleasants | last post by:
I recently built a database to help keep track of shipments we are bringing into the country. Included in the database are a number of fields with dates for shipment, ETA etc. Each one of these is accompanied by a "week no" relating to the week in the calendar year (I am sure many people are familiar with working with week nos and know what I mean). Currently the users have to refer to wall calendars which have the week nos listed on...
5
3039
by: Peter Bailey | last post by:
I have a query that returns , and : 12/05/04 3 Wednesday 13/05/04 0 Thursday and so on what I would like to do now is count the number of bookings by week so from monday to friday from the first date get the sum of bookings.
3
2202
by: Wired Hosting News | last post by:
Lets say I have 10 products in 10 different stores and every week I get a report from each store telling me how many items they have left for each of the 10 products. So each week I enter in 100 records with a store number, item number, on hand qty, and date of report into my sales data table. My tables primary is a combo of store# & Item number & Date After 10 week of this I have 1000 record total with ten unique dates.
5
3536
by: Wired Hosting News | last post by:
I tried to be breif and give a scenario so as not to be overlooked because it was soooo long. Let me give you real world. I am a manufacturer of goods and produce 11 items that are distributed to 1800 stores of a national home improvement chain store. Every week I electronicaly receive an excel spreadsheet "inventory report" with 19,800 rows or records, which I import into my tblSalesData table. The table now has 10 weeks of data or...
10
1251
by: Jim | last post by:
I'm sure this has been asked before but I can't find any postings. I have a table that has weekly inspections for multiple buildings. What I need to do is break these down by the week of the month of my choosing. Let me explain; I can get my week numbers no problem. I can get the date from the week numbers no problem. What I haven't been able to do is put things together and make a simple function that will allow my users to select from...
3
2627
by: sbaird | last post by:
Aloha from Hawaii, I'm beating my head on the wall here. I have a recruiting contact managment database I'm trying to create. Managers (there ar 14 of them) have to make a certain number of recruiting calls per week, and so many of them have to result in at least an appointment. However, the "week" is Wednesday, 12:01pm to the following Wednesday, 12:00noon. So here are my questions... 1) Is there a way to change the standard week...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10577
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10332
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10320
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10077
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9150
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.