Date re-format

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
 
B

Bob Phillips

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)
 
Top