LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 43
Default Peculiar date format behavior when replacing parts of date

I have a file in which one column consists of dates in a "dd.mm.yyyy" format
(e.g. 25.12.2006). I need to replace the "." with a "/" to obtain a
"dd/mm/yyyy" format (i.e. 25/12/2006).

When I do that manually with search and replace it works fine. However when
I record a macro to do the job the following happens: all dates there the dd
is 13 and above convertes correctly (e.g. 15.11.2006 becomes 15/11/2006);
however all dates where the dd is 12 or less swaps the dd and mm, e.g.
12.11.2006 becomes 11/12/2006! It looks as if the macro causes some of the
records to assume a US-type mm/dd/yyyy format.

I have tried to define the date format in different ways both before and
during the replacement but nothing seems to work.

I'm using Excel 2003 (11.8120.8122) SP2, fully opdated.

Anybody has an idea about how to solve this?

Thanks
Henrik
 
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
Copy and Paste Date - weird behavior matelot Excel Discussion (Misc queries) 3 February 23rd 07 05:20 PM
Date Format Behavior CraigH Excel Discussion (Misc queries) 1 May 13th 05 02:51 PM
Excel 2000 date format cannot be set to Australian date format Brian Jones Excel Discussion (Misc queries) 1 March 30th 05 06:03 AM
How do I stop excel replacing numerical values with the date? Becca C Excel Discussion (Misc queries) 2 December 21st 04 12:12 PM
Combine & Display “Fixed” & “Automatically Updated” Date Parts texcel Excel Worksheet Functions 1 November 1st 04 05:38 PM


All times are GMT +1. The time now is 08:51 PM.

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"