Discussion:
Weeknumber. msowcf.dll
(too old to reply)
Eef Houniet
2004-10-26 08:49:28 UTC
Permalink
According to "Help" it is possible to get the number of a week. Syntaxis (in
Dutch): WEEKNUMMER(serieel-getal; type_resultaat).

Help adds: If this function gives an errormessage, maybe you have to install
msowcf.dll.

In C:\Program Files\Microsoft Office\Office in find this msowcf.dll.

In spite of that, I do get an errormessage.

I use MS-Office Premium 2000.

What should I do to get the weeknumbers?

Thank you.
Eef Houniet
Brett Collings [429338]
2004-10-26 09:48:31 UTC
Permalink
Not sure if this is what you're asking

WEEKDAY()
---------
Returns a Variant (Integer) containing a whole number representing the
day of the week.

Syntax

Weekday(date, [firstdayofweek])

This example uses the Weekday function to obtain the day of the week
from a specified date.

Dim MyDate, MyWeekDay
MyDate = #February 12, 1969# ' Assign a date.
MyWeekDay = Weekday(MyDate) ' MyWeekDay contains 4 because
' MyDate represents a Wednesday.

Brett
Post by Eef Houniet
According to "Help" it is possible to get the number of a week. Syntaxis (in
Dutch): WEEKNUMMER(serieel-getal; type_resultaat).
Help adds: If this function gives an errormessage, maybe you have to install
msowcf.dll.
In C:\Program Files\Microsoft Office\Office in find this msowcf.dll.
In spite of that, I do get an errormessage.
I use MS-Office Premium 2000.
What should I do to get the weeknumbers?
Thank you.
Eef Houniet
Cheers,
Brett

----------------------------------------------
Be adventurous, be bold, be careful, be a star
----------------------------------------------
Brett Collings
Business & Systems Analyst
Management Information Systems Developer
Eef Houniet
2004-11-02 11:11:25 UTC
Permalink
Thank you for answering.

The suggestion of Brett gives the day of the week.
What I need is de week of the year.
The answer of Doug Steel helped to find that.

Me.WeekNr = DatePart("WW", [Date, vbFriday, vbFirstFullWeek)

Eef Houniet
Post by Brett Collings [429338]
Not sure if this is what you're asking
WEEKDAY()
---------
Returns a Variant (Integer) containing a whole number representing the
day of the week.
Syntax
Weekday(date, [firstdayofweek])
This example uses the Weekday function to obtain the day of the week
from a specified date.
Dim MyDate, MyWeekDay
MyDate = #February 12, 1969# ' Assign a date.
MyWeekDay = Weekday(MyDate) ' MyWeekDay contains 4 because
' MyDate represents a Wednesday.
Brett
Post by Eef Houniet
According to "Help" it is possible to get the number of a week. Syntaxis (in
Dutch): WEEKNUMMER(serieel-getal; type_resultaat).
Help adds: If this function gives an errormessage, maybe you have to install
msowcf.dll.
In C:\Program Files\Microsoft Office\Office in find this msowcf.dll.
In spite of that, I do get an errormessage.
I use MS-Office Premium 2000.
What should I do to get the weeknumbers?
Thank you.
Eef Houniet
Cheers,
Brett
----------------------------------------------
Be adventurous, be bold, be careful, be a star
----------------------------------------------
Brett Collings
Business & Systems Analyst
Management Information Systems Developer
Douglas J. Steele
2004-10-26 12:33:39 UTC
Permalink
You can get WeekNumber using the DatePart function with an interval of "ww",
or the Format function with a format of "ww". DatePart will return an
integer, Format will return a string. Read the help file: both functions
accept optional firstdayofweek and firstweekofyear parameters that affect
how the weeks are numbered.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)
Post by Eef Houniet
According to "Help" it is possible to get the number of a week. Syntaxis (in
Dutch): WEEKNUMMER(serieel-getal; type_resultaat).
Help adds: If this function gives an errormessage, maybe you have to install
msowcf.dll.
In C:\Program Files\Microsoft Office\Office in find this msowcf.dll.
In spite of that, I do get an errormessage.
I use MS-Office Premium 2000.
What should I do to get the weeknumbers?
Thank you.
Eef Houniet
Loading...