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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem returning week number and year

Status
Not open for further replies.

ejgb

Programmer
Oct 24, 2001
41
GB
I am stepping through a sequence of dates and formatting them for the week and year according to ISO Standards.
(i.e first day of week is Monday, First week of Year has at least 4 days of January.)

Format(selecteddate,"YYYY/WW",vbMonday,vbFirstFourDays)

I don't get a problem until I reach the end of the year. For example 31st Dec 2003 is on a Tuesday, and is in week 1 of 2004 according to ISO standards. However, when I run this date through the format command the result is 2003/1.

Is this a issue with the format command, or with the setup of the PC?
 
Oddly enough, we've discussed this in here before. Allow me to point you to thread222-646646
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top