LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA Date formatting and locale

Hi,

I am here in the UK, using VBA to import an XLS file into Access.

If I open the XLS file in Excel I can change the date formats to my
heart's content and it all works beautifully. If I change the data
format to "General", for example, I get...

38544...for 11th July, and
38545...for 12th July

However, when my Access application opens the same file and uses VBA to
change the format of the cells, I get...

38663...for 11th July (i.e. 7th November), and
38693...for 12th July (i.e. 7th December)

All the program does (at the moment) is open the file, format the
relevant column and save and close the file.

I cannot find any way of reading this date value correctly. It is
stored internally as a number, I appreciate, but even the number seems
to change if I open the file using VBA.

Any suggestions would be most welcome.

TIA

Phil

 
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 Format Under Japanese Locale York Excel Discussion (Misc queries) 3 December 19th 06 06:10 AM
Object doesn't support current locale setting: 'setlocale' Martin Eckart[_2_] Excel Programming 0 May 17th 05 09:41 AM
override locale computer settings n.almeida Excel Discussion (Misc queries) 3 February 18th 05 12:00 AM
TEXT(Cell1,"MMMM YYYY") to work in all locale. Dianne Excel Programming 0 February 10th 04 04:28 PM
TEXT(Cell1,"MMMM YYYY") to work in all locale. arno Excel Programming 0 February 10th 04 07:35 AM


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