Date Formatting

R

Robin Gray

I have a csv file which when opened with excel shows dates as 15041978 or
4051949. I am struggling to convert these to the normal format 15/04/1978
or 04/05/1949.
Any suggestions.

TIA
 
G

Gary''s Student

a tiny trick to make the parsing easier:
In B1:
=IF(LEN(A1)=8,A1,"0" & A1)
in C1:
=DATE(RIGHT(B1,4),MID(B1,3,2),LEFT(B1,2))

Format as you like.
 

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

Top