close

Hi and help.

I've got a csv file with lots of lovely information in it including
many a date field.

In the csv the date is in the format mm/dd/yyyy (or if there's a
leading zero m/dd/yyyy or mm/d/yyyy or m/d/yyyy), my problem is that
when I bring this in to excel it will recognise all of the dates with a
day of below 13 in the format dd/mm/yyyy and the other dates just go in
as text.

I can easily use a few text forumlea to reverse the day and month on
the ones recognised as text and these can happily be used as the
correct date but for the other dates they are taken as the wrong date
and I can't figure out a way or getting these back to being correct.

Any ideas?--
andyiain
------------------------------------------------------------------------
andyiain's Profile: www.excelforum.com/member.php...foamp;userid=8335
View this thread: www.excelforum.com/showthread...hreadid=511071I would rename the .csv file to .txt
then open that .txt file

You'll be able to specify the format for each field--including the date fields.

If you have to do this lots, you could record a macro when you do it once
manually and then just rerun that macro when you needed to import the .txt file
(important that the file is not named .csv.)

andyiain wrote:
gt;
gt; Hi and help.
gt;
gt; I've got a csv file with lots of lovely information in it including
gt; many a date field.
gt;
gt; In the csv the date is in the format mm/dd/yyyy (or if there's a
gt; leading zero m/dd/yyyy or mm/d/yyyy or m/d/yyyy), my problem is that
gt; when I bring this in to excel it will recognise all of the dates with a
gt; day of below 13 in the format dd/mm/yyyy and the other dates just go in
gt; as text.
gt;
gt; I can easily use a few text forumlea to reverse the day and month on
gt; the ones recognised as text and these can happily be used as the
gt; correct date but for the other dates they are taken as the wrong date
gt; and I can't figure out a way or getting these back to being correct.
gt;
gt; Any ideas?
gt;
gt; --
gt; andyiain
gt; ------------------------------------------------------------------------
gt; andyiain's Profile: www.excelforum.com/member.php...foamp;userid=8335
gt; View this thread: www.excelforum.com/showthread...hreadid=511071

--

Dave Peterson


That's got it.

Thanks for your help there.

Cheers
Andy.--
andyiain
------------------------------------------------------------------------
andyiain's Profile: www.excelforum.com/member.php...foamp;userid=8335
View this thread: www.excelforum.com/showthread...hreadid=511071

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()