VBA Date

C

Craig

If you assign the code VBA.Date() to something, it will
return the date as such: 11/4/2003

I want to know if there is any other syntax that will
return a date in a format that does not have slashes (or
any other character that would make an invalid file name)

i.e. a date that looks like: 11042003 or something like
that

thank you

Craig
(e-mail address removed)
 
D

Dev Ashish

I want to know if there is any other syntax that will
return a date in a format that does not have slashes (or
any other character that would make an invalid file name)

Use the Format function.

?vba.Format$(Now(), "mmddyyyy")

-- Dev
 

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