date formats

C

CathyZ

Hi,

I am using the function Format([myDate],"ww") to get the week number from
certain dates. I can get a number from 1 to 53, but it there any way to make
numbers between 1 and 9 appear as two digit numbers, eg. 01, 02, 03......

Thanks,

CathyZ
 
E

Ed Ardzinski

Hi Cathy! You have to nest another Format around the week format, using "0#"
as the format mask.

Format(Format(Me.txtDate, "ww"), "0#")
 
C

CathyZ

Thanks, worked fine.

Ofer said:
Try this

format(format(date(),"ww"),"00")


--
In God We Trust - Everything Else We Test


CathyZ said:
Hi,

I am using the function Format([myDate],"ww") to get the week number from
certain dates. I can get a number from 1 to 53, but it there any way to make
numbers between 1 and 9 appear as two digit numbers, eg. 01, 02, 03......

Thanks,

CathyZ
 
Top