Formatting a Variable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

“EndDate = Range("H1").Valueâ€
10/18/04 gets assigned to EndDate.
I can dump that to a cell and replace “/†with anything else.
How can I replace the forward slash, re-formatting that variable within this
procedure?

Thank you,
Arturo
 
Hi Arturo

A date variable does not contain any formatting, it does not contain any /
or - or . It only contains the real unformatted date, it's your computer
that formats its display. So you don't format the variable but its
representation wherever you see it displayed.

HTH. Best wishes Harald
 

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