pr0fier
asked on
How to format a cell in Excel 2010 and back to a date value?
I use a cell format 00"-"00"-"00 to input a "date" like 030271
(3 febr. 1971) But the cell does not contain a date using this method. What code can I use with VBA to convert this cell to the proper date value? It's not a problem if the result will be put in a different cell.
Thnx Remco
(3 febr. 1971) But the cell does not contain a date using this method. What code can I use with VBA to convert this cell to the proper date value? It's not a problem if the result will be put in a different cell.
Thnx Remco
ASKER
in my example 030271 this wil return 16111982 ??
Just use a custom number format of:
ddmmyy
and enter your date normally.
ddmmyy
and enter your date normally.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If you can use an adjacent cell, you can just use a formula:
=TEXT(A1,"00-00-00")+0
for example.
=TEXT(A1,"00-00-00")+0
for example.
mydate = format("myvalue", "DDMMYYYY")