Excel 2003, problem with UK date format, using OLE

  • Thread starter Thread starter Bill Dallas
  • Start date Start date
B

Bill Dallas

Hi all,

I have a C++ package that sends data to a spreadsheet using OLE. The
package works okay in Excel 97 and Excel 2000 systems, but has a
problem with Excel 2003.
In Excel 2003 the "Date" column is not recognised as a date when the
"Locale" is "UK" (left as "General"), but date is recognised okay when
the "Locale" is "US". If I just manually enter the date in "UK" it is
recognised okay.
I have tried formatting the column according to the "Locale"
("MM/DD/YY" or "DD/MM/YY" or "YY/MM/DD") before sending the data, and
leaving it as "General". Both give the same problem.
Can anyone tell me what I'm doing wrong?

Cheers

Bill Dallas
 
Hi Bill

I do not have XL 2003 but try formatting the relevant dates with dd/mmm/yy
Excel then usually gets the date correct and the problems of VB being quite
US centric are bypassed.
--
XL2002
Regards

William

(e-mail address removed)

| Hi all,
|
| I have a C++ package that sends data to a spreadsheet using OLE. The
| package works okay in Excel 97 and Excel 2000 systems, but has a
| problem with Excel 2003.
| In Excel 2003 the "Date" column is not recognised as a date when the
| "Locale" is "UK" (left as "General"), but date is recognised okay when
| the "Locale" is "US". If I just manually enter the date in "UK" it is
| recognised okay.
| I have tried formatting the column according to the "Locale"
| ("MM/DD/YY" or "DD/MM/YY" or "YY/MM/DD") before sending the data, and
| leaving it as "General". Both give the same problem.
| Can anyone tell me what I'm doing wrong?
|
| Cheers
|
| Bill Dallas
 

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

Similar Threads


Back
Top