How to convert string to date

P

Phil

Hello,

I have a string in Col H that is like this: 20021002.

I want it to show in Col I as 10/02/02, but I don't want it to be in date
format, just text format. However, if I DID want it date format, can you
also put what that would be as well?

What do you suggest?

TIA,

Phil
 
M

Marcelo

hi Phil

=date(left(a2,4),mid(a2,5,2),right(a2,2))

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Phil" escreveu:
 
D

David Billigmeier

Assume cell A1:

To output as text:
=TEXT(DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2)),"mm/dd/yyyy")

To output as date:
=DATE(LEFT(A1,4),MID(A1,5,2),RIGHT(A1,2))
Then:
<Format>
<Cells>
"Custom" tab
enter: mm/dd/yyyy
 
Top