Date Conversion

  • Thread starter Thread starter pjsicon
  • Start date Start date
P

pjsicon

I have data downloaded in this format ymmdd and of course excel
converts this to some date in 1985. I need to some how convert say
31209 to Dec, 12th 2003. Does anyone have any ideas?

Thanks in advance.
 
How does 31209 translate to Dec 12, 2003? Do you mean December 9 2003? If
you do, then:
=DATE(LEFT(A1,1)+100,MID(A1,2,2),RIGHT(A1,2))
should get you started.

Note: as is, the above version will break once you go from ymmdd to yymmdd.

=DATE(IF(LEN(A1)=6, LEFT(A1,2), LEFT(A1,1))+100, LEFT(RIGHT(A1,4),2),
RIGHT(A1,2))
will accomodate either format.

Hope this helps,
 
Back
Top