Date re-format

  • Thread starter Thread starter Kevin
  • Start date Start date
K

Kevin

I need to append the current date-time into a string
without slashes ("/") or dots ("."), to use as a
filename. I have passed the Date function to a variable,
but can't easily convert the format without parsing the
string to remove the slashes. Is there an easy way to
convert it to the native numeric format Excel uses
internally (that would work fine, I just need a date
string to differentiate filenames), or any otehr format
that would work in a filename? There must be an
easier/faster way than parsing this.

thanks

kpd
 
Kevin,

Try something like

sFileDate = Format(Date,"yyyymmdd")

and append that to the filename before saving

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 

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