Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Dates changing when opening a CSV

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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Dates changing when opening a CSV

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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Dates changing when opening a CSV

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening a file whose name is continuously changing tc Excel Programming 2 May 16th 08 05:41 PM
Changing column width for opening *.csv in Excel Netnathan Setting up and Configuration of Excel 2 February 2nd 07 02:41 PM
Changing Opening folder Blair Excel Worksheet Functions 2 July 1st 06 05:04 PM
Opening a file with changing dates kingkdz Excel Programming 3 June 27th 06 09:12 AM
Opening Excel after changing settings and add-ins swesterm Excel Discussion (Misc queries) 3 December 29th 04 06:54 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"