473,414 Members | 1,686 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Week number calculations

Hi,

Suppose I have a date, is there some way I can use Access to calculate the week number the date is in? And if so, can Access take notice of leap years?

Thanks!
Oct 29 '06 #1
4 31035
the function is

week(YourDate)

Access automatically takes care of leap years
Oct 29 '06 #2
the function is

week(YourDate)

Access automatically takes care of leap years
Thanks a lot!

Another question: can this be domne the other way around to? Can I access to give me, for example, the date of the first day of a week?
Oct 29 '06 #3
PEB
1,418 Expert 1GB
Hi,

So there is a function

Weekday(MyDate)

That can help you about

In fact there isn't function week() in Access...

The function for the week is:

Datepart("ww", Your Date)

:)
Oct 29 '06 #4
MMcCarthy
14,534 Expert Mod 8TB
Hi,

So there is a function

Weekday(MyDate)

That can help you about

In fact there isn't function week() in Access...

The function for the week is:

Datepart("ww", Your Date)

:)
To expand on on PEB's post ...

DatePart ("ww", date)

returns the week number of any date, the default for week one is the week containing January 1st. The first day of the week defaults to sunday.

to get the day of the week of any date

Weekday (date) returns a number 1 to 7, 1 being sunday

WeekdayName (Weekday (date)) returns the week day name in Full

WeekdayName (Weekday (date), True) returns abbreviated week day name
Oct 29 '06 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Shahid Juma | last post by:
Hi, I am trying to figure out a way to get the week number of the current week. I know this is relatively easy using the calendar year (starting from January to now). However, I want to do it so...
7
by: Shuffs | last post by:
Could someone, anyone please tell me what I need to amend, to get this function to take Sunday as the first day of the week? I amended the Weekday parts to vbSunday (in my code, not the code...
4
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...
2
by: Rustan | last post by:
Hi Im using GregorianCalendar to find out the current years week numbers. When the user chooses a week number in a dropdown i want to show that week in a table with the corresponding dates. For...
3
by: Mal | last post by:
Hello, Any advice on a function to convert a given week number to a date? Ideally I'd like the first day of that week. I'm using this to compare year to year....using the week number as the...
3
by: reesa | last post by:
Hi All , I am having some problem in week number culculation. What i have to do is I will get as set of data with ord _week eg.200728,200729,200730 Basically i will have a parameter to...
5
by: Michael R. Copeland | last post by:
I need to determine a given date's week number, but my searches of google only confuse and frustrate me: there are many apparent formulas (which are pretty complex) and they all seem to require...
4
by: Vince | last post by:
Given a week Number, how do I calculate the date that for the Monday of that week?
3
by: MrDeej | last post by:
Hello my good it people! Since new year we have experienced a fault in our diagrams and reports in access. They show that we are in week 4, even when i let the diagram self make the week number...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.