Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
strippier
 
Posts: n/a
Default importing a text file - problem with dates "Americanising"

Hiya,

I frequently import text files into Excel through macro's and have found
that moving onto Excel 2003 has resulted in the dates being reversed.

i.e 8th December 2005 08/12/05 being imported as 12/08/05. I have checked
the formatting in Excel and this does not appear to be the issue. It appears
that the data is 12/08/05 rather then the expected 08/12/05.

When I revert back to Excel 98/2000 everything works fine. I have tried
recreating the macros in 2003 which doesn't seem to solve the issue.

Any thoughts / ideas appreicated.

Thanks

Simon
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default importing a text file - problem with dates "Americanising"

Name the text file *.txt. Then record a macro when you do the import. You'll
be able to specify mdy or dmy or whatever you want for each date field.

strippier wrote:

Hiya,

I frequently import text files into Excel through macro's and have found
that moving onto Excel 2003 has resulted in the dates being reversed.

i.e 8th December 2005 08/12/05 being imported as 12/08/05. I have checked
the formatting in Excel and this does not appear to be the issue. It appears
that the data is 12/08/05 rather then the expected 08/12/05.

When I revert back to Excel 98/2000 everything works fine. I have tried
recreating the macros in 2003 which doesn't seem to solve the issue.

Any thoughts / ideas appreicated.

Thanks

Simon


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
strippier
 
Posts: n/a
Default importing a text file - problem with dates "Americanising"

Have amended the import macro so that particular array now has the "switch"
set to number 4 rather than 1, the results are the same. The thing I forgot
to mention in the original string is that some of the file imports ok (with
correct dates) but some lines import incorrect!!! Confuses me as the data is
consistent in the underlying text file! Maybe a Microsoft bug?!?

"Dave Peterson" wrote:

Name the text file *.txt. Then record a macro when you do the import. You'll
be able to specify mdy or dmy or whatever you want for each date field.

strippier wrote:

Hiya,

I frequently import text files into Excel through macro's and have found
that moving onto Excel 2003 has resulted in the dates being reversed.

i.e 8th December 2005 08/12/05 being imported as 12/08/05. I have checked
the formatting in Excel and this does not appear to be the issue. It appears
that the data is 12/08/05 rather then the expected 08/12/05.

When I revert back to Excel 98/2000 everything works fine. I have tried
recreating the macros in 2003 which doesn't seem to solve the issue.

Any thoughts / ideas appreicated.

Thanks

Simon


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default importing a text file - problem with dates "Americanising"

I'd guess it's not a bug.

But maybe you're looking at the field and seeing a date and assuming it's
correct.

In a text file, 01/02/03 would look like a date.

Depending on your windows setting, it may even import like a date--but it may
not be the date that it's supposed to be.

I'd format those date fields in an unambiguous format: mmmm dd, yyyy
and then look to see if each field got imported correctly--not just as a date.


strippier wrote:

Have amended the import macro so that particular array now has the "switch"
set to number 4 rather than 1, the results are the same. The thing I forgot
to mention in the original string is that some of the file imports ok (with
correct dates) but some lines import incorrect!!! Confuses me as the data is
consistent in the underlying text file! Maybe a Microsoft bug?!?

"Dave Peterson" wrote:

Name the text file *.txt. Then record a macro when you do the import. You'll
be able to specify mdy or dmy or whatever you want for each date field.

strippier wrote:

Hiya,

I frequently import text files into Excel through macro's and have found
that moving onto Excel 2003 has resulted in the dates being reversed.

i.e 8th December 2005 08/12/05 being imported as 12/08/05. I have checked
the formatting in Excel and this does not appear to be the issue. It appears
that the data is 12/08/05 rather then the expected 08/12/05.

When I revert back to Excel 98/2000 everything works fine. I have tried
recreating the macros in 2003 which doesn't seem to solve the issue.

Any thoughts / ideas appreicated.

Thanks

Simon


--

Dave Peterson


--

Dave Peterson
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
Stop excel from dropping the 0 in the beginning of a number? Rosewood Setting up and Configuration of Excel 12 April 4th 23 02:12 PM
Importing a text file Bill Excel Discussion (Misc queries) 1 December 9th 05 07:00 PM
dates and text Sloth Excel Discussion (Misc queries) 0 November 18th 05 04:16 PM
character restrictions when importing data from a text file richtea Excel Discussion (Misc queries) 3 September 3rd 05 04:13 PM
File is locked for Editing by user problem Mirth Excel Discussion (Misc queries) 1 December 3rd 04 04:45 PM


All times are GMT +1. The time now is 06:11 AM.

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

About Us

"It's about Microsoft Excel"