ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Incorrect date format (https://www.excelbanter.com/excel-programming/299247-incorrect-date-format.html)

Ric[_4_]

Incorrect date format
 
I have some VB6 code that writes a CSV and then uses OLE
to open it in Excel 2002. Somebody has just pointed out
that the dates are being interpreted as US format even
though the regional settings are for the UK. When I look
at the CSV that is written, the dates are OK. If I open
that CSV manually it looks fine. But as soon as I use OLE
to do the work, the dates get reversed. I'm pretty sure
that this has only just started to happen. Has anyone else
encountered this ?


Ric[_4_]

Incorrect date format
 
I can't believe I've had no response to this. I can't find
anything about this on the net, although somebody here has
told me it's a bug in OLEDB. Can somebody please tell me
whether this is the case ?

onedaywhen

Incorrect date format
 
"Ric" wrote ...

I can't believe I've had no response to this.


I just responded to your other thread on this subject.

--

Sue C[_2_]

Incorrect date format
 
Hi Ric,

I am having the same problem, if you found a solution would you please let me know .... absolutely desperate!

Thanks

"Ric" wrote:

I have some VB6 code that writes a CSV and then uses OLE
to open it in Excel 2002. Somebody has just pointed out
that the dates are being interpreted as US format even
though the regional settings are for the UK. When I look
at the CSV that is written, the dates are OK. If I open
that CSV manually it looks fine. But as soon as I use OLE
to do the work, the dates get reversed. I'm pretty sure
that this has only just started to happen. Has anyone else
encountered this ?



Always Learning

Incorrect date format
 
Hi Sue,

Open the file as .Txt not .Csv then you can import all columns as text.
Excel has a very bad habit of assuming what the data is and auto converting.

All the best,

Steve Wilson.
"Sue C" <Sue wrote in message
...
Hi Ric,

I am having the same problem, if you found a solution would you please let

me know .... absolutely desperate!

Thanks

"Ric" wrote:

I have some VB6 code that writes a CSV and then uses OLE
to open it in Excel 2002. Somebody has just pointed out
that the dates are being interpreted as US format even
though the regional settings are for the UK. When I look
at the CSV that is written, the dates are OK. If I open
that CSV manually it looks fine. But as soon as I use OLE
to do the work, the dates get reversed. I'm pretty sure
that this has only just started to happen. Has anyone else
encountered this ?






All times are GMT +1. The time now is 08:05 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com