force 2 digit ww date format

pungentSapling

NeedHotSauce?
Local time
Today, 15:51
Joined
Apr 4, 2002
Messages
115
is there a way to force the date format 'ww' to display two digits
for example week 1 = 01
not 1 ... every other date format seems to have an option for holding places but not ww.
Am I realy going to have to count the digits and concatenate a zero every time I have a single digit week? pls say no.

the format I am using is yyww

thanks
pung
 
Got caught out myself on this little issue, but used this to work around it :

Format([Fieldname],"ww/yy- ",0)

or

if you want to make it so it appears in the right order:

Week: IIf(Len(Format([Fieldname],"ww"))=1,Format([Fieldname],"-yy-" & "0" & "ww"),Format([Fieldname],"-yy-ww"))

The reason for the dash beforehand is if you use the data in a graph as an axis, it assumes 02/02 (ww/yy) is 02 feb and cannot be formatted back as excel / graph OLE objects doesn't recognise weeks!:D
 

Users who are viewing this thread

Back
Top Bottom