FORMAT WEEK NUMBER

M

Martina

how can i show the leading zeros in the week number format?
for instance:
week 1 would show 01-2006
week 9 wpid; sjpw 09-2006
 
M

MGFoster

Martina said:
how can i show the leading zeros in the week number format?
for instance:
week 1 would show 01-2006
week 9 wpid; sjpw 09-2006

Format(date_column,"ww-yyyy")
 
M

Marshall Barton

Martina said:
how can i show the leading zeros in the week number format?
for instance:
week 1 would show 01-2006
week 9 wpid; sjpw 09-2006


I don't know how you are calculating the week number, but
maybe this will help:

Format(DatePart("w", datefield), "00") &
Format(DatePart("yyyy", datefield), "0000")
 
M

Martina

Marsh, thank you so much! Your formula helped! I just used ww insted of w and
included &"-"& inbetween the date parts.

Would you recommend any books on advanced access functions?
 
Top