Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Csv date format problem

Hi there,

I have a macro that opens a csv file with dates (and then copies them into
another file), and although the dates are in dd/mm/yyyy format (and so is my
system), they always get opened as mm/dd/yyyy. This only happens when I run
the macro, not when I do the same thing manually.

I've found a few odd workarounds, but am hoping someone can help me find
something to cater for this that will leave the dates in dd/mm/yyyy!

:-)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Csv date format problem

You (or your macro) need to invoke the Import Wizard to get the proper format.

1. swtich on the Macro Recorder
2. Data Import External Data... Import Data and then use the Wizard
manually
3. stop the Macro Recorder

Examining/adapting the Recorder code should solve your problem.
--
Gary''s Student - gsnu200835


"DAustin" wrote:

Hi there,

I have a macro that opens a csv file with dates (and then copies them into
another file), and although the dates are in dd/mm/yyyy format (and so is my
system), they always get opened as mm/dd/yyyy. This only happens when I run
the macro, not when I do the same thing manually.

I've found a few odd workarounds, but am hoping someone can help me find
something to cater for this that will leave the dates in dd/mm/yyyy!

:-)

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Csv date format problem

As with many of these things, no idea about why the original problem occurs,
but your alternative is great so I won't bother worrying any more ... thanks
very much!

"Gary''s Student" wrote:

You (or your macro) need to invoke the Import Wizard to get the proper format.

1. swtich on the Macro Recorder
2. Data Import External Data... Import Data and then use the Wizard
manually
3. stop the Macro Recorder

Examining/adapting the Recorder code should solve your problem.
--
Gary''s Student - gsnu200835


"DAustin" wrote:

Hi there,

I have a macro that opens a csv file with dates (and then copies them into
another file), and although the dates are in dd/mm/yyyy format (and so is my
system), they always get opened as mm/dd/yyyy. This only happens when I run
the macro, not when I do the same thing manually.

I've found a few odd workarounds, but am hoping someone can help me find
something to cater for this that will leave the dates in dd/mm/yyyy!

:-)

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
Date Format Problem Alain Excel Discussion (Misc queries) 2 May 31st 10 04:53 PM
date format problem KevHardy Excel Discussion (Misc queries) 8 February 13th 10 09:17 AM
Excel Format Problem - Date Overrides Format Mary Excel Discussion (Misc queries) 5 February 10th 10 05:49 AM
Date Format Problem (bug) Steve - Rabbit Man Excel Discussion (Misc queries) 5 October 31st 09 01:43 AM
Please can anyone help me? Big problem with date format. [email protected] Excel Programming 1 May 4th 08 12:02 PM


All times are GMT +1. The time now is 08: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"