views:

19

answers:

1

Hi,

If i use

DatePart("m",Now()) ' out put will be 7

but my requirment is to display "07" rather than "7"

Is there any direct method to achieve this, or should should I write custom code to prefix "0" zero?

+1  A: 

they easy solution would be

right( "0" & DatePart("m",Now()) ,2)

Gaby
Gee... ty :)You saved my time!
Sandy
@Sandy, cool :]
Gaby