On Wed, 9 Apr 2008 09:11:03 -0700, Howard - JC Publishing
<(E-Mail Removed)> wrote:
>I am importing data from our database into Excel. The database program
>stores dates as a string such as 20080124. I want to convert that string the
>mm/dd/yyyy.
>
>Thank you.
>
First convert it to a real Excel date:
=DATE(INT(A1/10^4),MOD(INT(A1/10^2),100),MOD(A1,100))
Then, either format the cell as you wish, or use the TEXT function:
=TEXT(DATE(INT(A1/10^4),MOD(INT(A1/10^2),100),MOD(A1,100)),"mm/dd/yyyy")
--ron
|