Two digit week of the year

  • Thread starter Thread starter Mari
  • Start date Start date
M

Mari

I need help trying to make a date including a two digit week
The code use now is in the default value section
=Format(Now(),"yyww")
this fine for any week after 9 of the year before that I get a three digit
code instead of four
Like today I should get 0902, but I get 092 after week 9, I will get 0910
and that is perfect.
Any bode know how to force the week into a two digit code.
I was thinking an if then statement checking for the week and then forcing
the code but it seems a little compliacted if there is just a simple answer..
Thank you ahead of time for your help
 
Mari said:
I need help trying to make a date including a two digit week
The code use now is in the default value section
=Format(Now(),"yyww")
this fine for any week after 9 of the year before that I get a three digit
code instead of four
Like today I should get 0902, but I get 092 after week 9, I will get 0910
and that is perfect.
Any bode know how to force the week into a two digit code.
I was thinking an if then statement checking for the week and then forcing
the code but it seems a little compliacted if there is just a simple answer..
Thank you ahead of time for your help

Where are you finding "ww" documented? I get 09ww as output. Is this vb6?

Mike
 
Mari said:
This code is used in under Microsoft Access 2003.

OK, that's why it didn't make sense here. This group is for .Net
programming questions. For MS Access programming, a better group is probably
one dedicated to Office where VBA developers hang out. Try a group like
microsoft.public.access.modulesdaovba.
 
Back
Top