CSV File - Date Formats
I have US English, so I don't personally have to deal with this problem, but
here is my understanding:
In Excel 2002/2003, there are some options you can use to control this.
expression.Open(FileName, UpdateLinks, ReadOnly, Format, Password,
WriteResPassword, IgnoreReadOnlyRecommended, Origin, Delimiter, Editable,
Notify, Converter, AddToMru, Local, CorruptLoad)
help on Local:
Local Optional Variant. True saves files against the language of Microsoft
Excel (including control panel settings). False (default) saves files
against the language of Visual Basic for Applications (VBA) (which is
typically US English)
In other versions, you can rename the file as .txt, then open it using the
text import wizard. In the wizards last screen, you can specify for that
column of dates, how they should be interpreted.
--
Regards,
Tom Ogilvy
"Nigel" wrote in message
...
Hi All
I have a CSV file that contains dates held in European format
(dd/mm/yyyy).
When I open it manually using Excel, the dates remain unchanged. If I
open
it using VBA then the dates are changed to US format where they can... so
01/04/2005 becomes 04/01/2005. However dates that cannot be converted eg
23/03/2005 are left as is. I end up with a mixture of dates and
formatting
does reset my dates to the correct format!
How can I avoid this problem?
--
Cheers
Nigel
|