View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Alan Alan is offline
external usenet poster
 
Posts: 492
Default Excel auto(in)corrects dates from a csv file.

Are you sure that Excel is seeing the wrong ones as dates at all? Try
formatting the cell containing the Fourteenth of November 2006 as 'General'
and you should get the number 39035.
I don't think you will. Excel stores dates as the number of days elapsed
since the first of January 1900, so it's never going to display the eleventh
of the fourteenth month, it can't if the import is a genuine date.
Also try formatting the possible dates, like the 12th of October as General
and see what you get. Type that date in another cell and compare the
results.
Post back and someone may have a solution.
I had a similar problem importing from an Oracle database, but I never got
the 'impossible' dates, it reversed the days and the month up to the 12th
month and the rest were OK.
Not trying to depress you, but I never did find a solution, I just had to
change them manually, a tedious business to say the least.
Regards,
Alan.

"gromit12" wrote in message
...
Hi,

I have a csv file with dates in the format: 1/30/2007

When excel (2003 and 2007) imports the file it tries to switch the day
and the month:

e.g. It treats 10/12/2006 as 10 December instead of 12 October
When the date would make no sense this way, (e.g. 11/14/2006), it
imports this as text: "11/14/2006"

How can I correct this / or switch off the auto date correction?

It may be relevant that I'm Canada, where the day/month/year order is
sometimes used. I have tried changing my computer regional settings to
US rather Canada and have restarted Excel, but no luck.

Any suggestions much appreciated!