Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Opening a file whose name is continuously changing | Excel Programming | |||
Changing column width for opening *.csv in Excel | Setting up and Configuration of Excel | |||
Changing Opening folder | Excel Worksheet Functions | |||
Opening a file with changing dates | Excel Programming | |||
Opening Excel after changing settings and add-ins | Excel Discussion (Misc queries) |