LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
gc gc is offline
external usenet poster
 
Posts: 13
Default Date problems when importing txt files

Hello,

I have an application that reads data into Access. It accepts different file
types (.txt, .xls), opens them in excel, then manipulates the data and stores
the date in SQL-Server. The files cannot be opened manually (there are lots
of them!), but using the command:

dim booki As Excel.Workbook
set booki = General.Excel.Workbooks.Open(fileName)

Where fileName is the file name provided by the user.

The problem is that when providing a .txt file, Excel reads the date as
mm/dd/yyyy,
while I need it as dd/mm/yyyy. My regional setting is set to dd/mm/yyyy, but
it seems to be ignored.

It is intersting that when I open the .txt files manually, the dates are
formatted correctly (dd/mm/yyyy)!

Does anyone have any idea how to solve the problem? I tried to formatNumber
the date column, but even this does not help!
I tried both on win2000 and xp - and I am using excel 2003 and Acess 2003.

Thanks!
GC.

 
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
Importing into excel PROBLEMS [email protected] Excel Worksheet Functions 1 January 11th 08 03:01 PM
Importing problems remondrop Excel Discussion (Misc queries) 3 May 25th 07 08:16 PM
problems with importing an image Todd Excel Discussion (Misc queries) 0 January 29th 07 10:10 PM
importing csv files, problem with date formats jiwolf Excel Worksheet Functions 5 March 7th 06 12:48 AM
printing/importing problems Steve Excel Programming 3 April 28th 04 07:17 PM


All times are GMT +1. The time now is 10:56 PM.

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"