ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formatting a Variable (https://www.excelbanter.com/excel-programming/313914-formatting-variable.html)

Arturo

Formatting a Variable
 
€ś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

Harald Staff

Formatting a Variable
 
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

"Arturo" skrev i melding
...
"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





All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com