Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get the week number

Status
Not open for further replies.

Albano

Instructor
Dec 11, 2000
221
PT
Hi,

Someane knows, how can I calculate the week number counting from the begin of the year, Eg:today is 19-05-2004 and this is the 19 week.

Thanks,

Albano
 
Something like:

[tt]MsgBox CStr(DatePart("ww", Now, vbMonday, vbFirstFullWeek))[/tt]

But even forcing "first full week" mode I get 20 back.
 
Hello Albano,

[1] You have supported function to give you the day of the week of the 1stday of the year, eg. 2004 Thursday.
[2] You have support function to calculate the number of days elapsed today since new year.

I make a honest counting from the calendar and come out 20 weeks. It proves that you have to define what is the "week number". The understanding of it can be divided. After you specify the meaning, I am sure you have already got half the solution.

regards - tsuji
 
If it is in Excel you can use the function WEEKNUM

You can use + or - if the weeknumber in your company is not thesame as Excel's

regards

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top