Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Import from text file with German Date seperator

Hi,

I am after a little help with a small problem with date seperators. I
am using a excel VBA to import data from a text file that uses "." as
date seperators, as my regional settings are set to "/" the date
functions will not work.

Here is the part of the code that is causing the problem:

If CDate(TempStartDate) = CDate(beginDate) And CDate(TempStartDate) <=
CDate(endDate) Then .....


i have tried to do the follow change to this code but still get no joy:

If CDate(Replace(TempStartDate, ".", "/")) = CDate(beginDate) And
CDate(Replace(TempStartDate, ".", "/")) <= CDate(endDate) Then


Can any one help me with this before I give in:(

Many Thanks

Ian

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Import from text file with German Date seperator

Hi Crumb

Start here
http://www.oaltd.co.uk/ExcelProgRef/default.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Crumb" wrote in message oups.com...
Hi,

I am after a little help with a small problem with date seperators. I
am using a excel VBA to import data from a text file that uses "." as
date seperators, as my regional settings are set to "/" the date
functions will not work.

Here is the part of the code that is causing the problem:

If CDate(TempStartDate) = CDate(beginDate) And CDate(TempStartDate) <=
CDate(endDate) Then .....


i have tried to do the follow change to this code but still get no joy:

If CDate(Replace(TempStartDate, ".", "/")) = CDate(beginDate) And
CDate(Replace(TempStartDate, ".", "/")) <= CDate(endDate) Then


Can any one help me with this before I give in:(

Many Thanks

Ian



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 conversion on text file import Calmack Excel Discussion (Misc queries) 5 November 11th 08 06:39 PM
Date Seperator burt Excel Discussion (Misc queries) 2 August 6th 08 03:00 PM
Excel Addin altering date format on text file import RJ Lohan[_2_] Excel Programming 3 March 3rd 05 01:09 AM
import .CSV file to XP EXcel 2003 worksheet, the seperator is com. ML New Users to Excel 1 January 22nd 05 05:23 PM
Problem with COM Addin in German OS and German Office. Kumar Excel Programming 1 September 11th 04 01:01 PM


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