Import from text file with German Date seperator

  • Thread starter Thread starter Crumb
  • Start date Start date
C

Crumb

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top