Work Week Function

S

sap4ora

Hello,

Looking for a function or procedure to calculate work week based on Monday
as the first day of the week. For example Year (2006)

WW: 1
Date: 1/2/06-1/8/06

WW: 2
Date: 1/9/06-1/15/06


WW:34
Date: 8/21/06-8/27/06


Regards,
 
D

Douglas J. Steele

Try DatePart("ww", MyDateValue, vbMonday)

Note that there's a fourth parameter, as well, that lets you specify the
first week of the year (You can specify 1 to start with the week in which
January 1st occurs, 2 to start with the first week that has at least 4 days
in the new year or 3 to start with the first full week of the year)
 
S

sap4ora

Thank you Doug.

Douglas J. Steele said:
Try DatePart("ww", MyDateValue, vbMonday)

Note that there's a fourth parameter, as well, that lets you specify the
first week of the year (You can specify 1 to start with the week in which
January 1st occurs, 2 to start with the first week that has at least 4 days
in the new year or 3 to start with the first full week of the year)
 

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