PC Review


Reply
Thread Tools Rate Thread

Dates changing when opening a CSV

 
 
Skeniver
Guest
Posts: n/a
 
      9th Oct 2008
Hi there

I am opening a CSV file with a bank account statement details in. Excel is
changing the date for mat for some of the dates (but not all of them). So
01/08/2008 (1 Aug 08) is becoming 08/01/2008 (8 Jan 08), but this only
happens for dates before the 12th of every month. It's really irritating! If
I open the CSV manually, it works fine, but with my macro it changes. I can't
figure out a solution...

PLEASE HELP!

ps. I am using Office 2003.
 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      9th Oct 2008
Rename your .csv file to .txt.

Then open excel and use File|Open to open the text file.

You'll see a text import wizard appear where you can specify each
field--including the order of the date fields.

Skeniver wrote:
>
> Hi there
>
> I am opening a CSV file with a bank account statement details in. Excel is
> changing the date for mat for some of the dates (but not all of them). So
> 01/08/2008 (1 Aug 08) is becoming 08/01/2008 (8 Jan 08), but this only
> happens for dates before the 12th of every month. It's really irritating! If
> I open the CSV manually, it works fine, but with my macro it changes. I can't
> figure out a solution...
>
> PLEASE HELP!
>
> ps. I am using Office 2003.


--

Dave Peterson
 
Reply With Quote
 
Leo Mazzi
Guest
Posts: n/a
 
      9th Oct 2008
Since you are not specifying the format of the date, Excel tries to figure it
out by itself. Seems that the default date format Excel is using (I belive
that this depends on your regional settings) is month/day/year. For dates
where there is no problem in conversion (because you have 12 days and 12
months) it selects the default format - otherwise it tries to figure out the
possible format so it tries to use day/month/year.

Unfortunately for you all your dates are in the format day/month/year

I belive that the solution that Dave gave you will fix the problem - script
the procedure and you'll have the correct macro

Best regards,
Leo

"Skeniver" wrote:

> Hi there
>
> I am opening a CSV file with a bank account statement details in. Excel is
> changing the date for mat for some of the dates (but not all of them). So
> 01/08/2008 (1 Aug 08) is becoming 08/01/2008 (8 Jan 08), but this only
> happens for dates before the 12th of every month. It's really irritating! If
> I open the CSV manually, it works fine, but with my macro it changes. I can't
> figure out a solution...
>
> PLEASE HELP!
>
> ps. I am using Office 2003.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop UK-style dates changing to US-style dates when mailmerging. Jean XO Microsoft Excel Misc 1 20th Dec 2007 12:35 PM
Opening a file with changing dates kingkdz Microsoft Excel Programming 3 27th Jun 2006 09:12 AM
Change Start Dates without Changing Due Dates Beth Microsoft Outlook Discussion 0 19th Aug 2004 03:44 PM
Re: Changing Dates John Vinson Microsoft Access Form Coding 0 7th Jul 2003 07:49 AM
Re: Changing Dates Allen Browne Microsoft Access Form Coding 0 7th Jul 2003 07:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:53 AM.