Weeknumber. msowcf.dll

E

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
 
B

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



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
 
D

Douglas J. Steele

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.
 
E

Eef Houniet

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

Brett Collings said:
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



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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top