eureka15
asked on
Convert number to date
I need help in converting this number to a date 1070922 to 9/22/07 it is a number and not text.
A formula or macro would work. It is in column K.
A formula or macro would work. It is in column K.
Are they always in this format?
ASKER
yes
I am sure there is a way to do this with with a macro or VBA script, but here is a workaround.
A1: 1072210
B1: =LEFT(RIGHT(A1,6),2)
C1: =LEFT(RIGHT(A1,4),2)
D1: =LEFT(RIGHT(A1,2),2)
E1: =D1&"/"&C1&"/"&B1
You could hide columns B, C, and D if you don't want to see them.
A1: 1072210
B1: =LEFT(RIGHT(A1,6),2)
C1: =LEFT(RIGHT(A1,4),2)
D1: =LEFT(RIGHT(A1,2),2)
E1: =D1&"/"&C1&"/"&B1
You could hide columns B, C, and D if you don't want to see them.
Assuming that 0990922 should be converted into September 22, 1999 and 1071022 into October 22, 2007, you might try:
=DATE(LEFT(A1,3)+1900,MID( A1,4,2),RI GHT(A1,2))
Format the results of the formula as a date.
Brad
=DATE(LEFT(A1,3)+1900,MID(
Format the results of the formula as a date.
Brad
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Brad
What can I say...You did it once again!
Would not have even thought of +1900.
Thank You :)
What can I say...You did it once again!
Would not have even thought of +1900.
Thank You :)