find current data with macro

  • Thread starter Thread starter Francesco Magagnino
  • Start date Start date
F

Francesco Magagnino

Hi,
i'm looking for the macro code to find out the current date and have
it in this format 20080905 (yyyymmdd)

it's should be easy but i don't find anything about it

please can anyone help me

thanks
francesco
 
Tnhanks!
i had tried this and it didn't work...
now i have understand!

i used:

Dim y As Date
y = Format(Date, "yyyymmdd")

but the right one was

Dim y As String
y = Format(Date, "yyyymmdd")

Bye bye
Franz
 

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

Back
Top