how to store the current date in a string in DDMMYYYY format?

D

derricklo1980

Hi,
I want to store today value in a string in VBA Word, e.g. today is Oc
04 2012, the string will be = "04102012". Any simple code can achiev
that?

Thanks
 
D

derricklo1980

derricklo1980;493363 said:
Hi,
I want to store today value in a string in VBA Word, e.g. today is Oc
04 2012, the string will be = "04102012". Any simple code can achiev
that?

Thanks!

I have the solution now, thanks.

Dim dateStr As String
dateStr = Format(Now, "ddmmyyyy"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top