Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Date format when opening a .CSV file programmatically

have a date 05/11/2003 in a cell in a csv file
if I open the file manually it reads 05/11/2003
if I open the file via vba it reads 11/05/2003

(if I right click on the cell in all three above cases the format is
the same Custom - "dd/mm/yyyy")

Any ideas

Jason
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Date format when opening a .CSV file programmatically

What Regional Setting is your computer set to?

dd/mm/yyyy is not US format. Possibly default VBA format used for date is
US? Just a guess.

Angus Comber

"jason" wrote in message
om...
have a date 05/11/2003 in a cell in a csv file
if I open the file manually it reads 05/11/2003
if I open the file via vba it reads 11/05/2003

(if I right click on the cell in all three above cases the format is
the same Custom - "dd/mm/yyyy")

Any ideas

Jason



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 104
Default Date in a .CSV file - IS THIS A BUG??

Angus,

Have you tried this?!!!
I've just trued this at home and it looks almost like a bug!
Typed 05/11/2003 in A1 and saved it as a csv file.
Closed the file and opened it again manually - still 05/11/2003.
Opened another workbook and recorded a macro of opening the csv file.
Gone back to the recorded macro and run it - now it is 11/05/2003 !!!
(still 05/11/2003 when manually opened)
Regional settings are set to dd/MM/YYYY.

Help.
Jason.


"Angus Comber" wrote in message ...
What Regional Setting is your computer set to?

dd/mm/yyyy is not US format. Possibly default VBA format used for date is
US? Just a guess.

Angus Comber

"jason" wrote in message
om...
have a date 05/11/2003 in a cell in a csv file
if I open the file manually it reads 05/11/2003
if I open the file via vba it reads 11/05/2003

(if I right click on the cell in all three above cases the format is
the same Custom - "dd/mm/yyyy")

Any ideas

Jason

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 format problem from opening dbf file in excel 2007 pol Excel Discussion (Misc queries) 5 December 1st 08 11:42 AM
Disable macros on a programmatically opening .xls file Matt[_2_] Excel Discussion (Misc queries) 2 May 25th 07 04:45 AM
How to use the exact format in a csv file when opening a csv file tong Excel Discussion (Misc queries) 1 October 13th 05 05:41 AM
When opening-file format is not valid Blair Setting up and Configuration of Excel 3 August 14th 05 06:30 AM
Opening a csv file with US date format on a Australian PC Troy Lea Excel Discussion (Misc queries) 2 March 16th 05 10:05 PM


All times are GMT +1. The time now is 03:12 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"