find last week of a year

  • Thread starter Thread starter Keesb
  • Start date Start date
K

Keesb

I have a field [HourDate]. I need to find what is the last possible week for
the year of the date in that field.
I'm using DatePart("ww", [HourDate], 2, 0) to get the week out of that date.

So the answer will always be 52 or 53. (f.e. the year 2009 has 53 weeks)

How can I do so in VBA?

Kees
 
I have a field [HourDate]. I need to find what is the last possible week for
the year of the date in that field.

Try:

Format(DateSerial(Year([HourDate]), 12, 31), "ww")

John W. Vinson[MVP]
 
That will do.

Thanks

Kees

John Vinson said:
I have a field [HourDate]. I need to find what is the last possible week
for
the year of the date in that field.

Try:

Format(DateSerial(Year([HourDate]), 12, 31), "ww")

John W. Vinson[MVP]
 
Back
Top