473,385 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

TEXT file column returns date when it isn't.

I have a comma-delimited text file that I am reading via a connection
string:

junk = "Provider=Microsoft.Jet.OLEDB.4.0;"
junk &= "Data Source=\inware\data\df;"
junk &= "Extended Properties=""text;HDR=No;FMT=Delimited"""

And ...

strSQL = "SELECT * FROM " & Trim(in_file) & ".TXT"
Dim da As New System.Data.OleDb.OleDbDataAdapter(strSQL, tmpConnection)
Dim ds As New DataSet("Workbook")
Dim dt As DataTable
Dim drRow As DataRow

da.Fill(ds, "Sheet1")
dt = ds.Tables("Sheet1")

recordcnt = 0
For Each drRow In dt.Rows
Next

One column in the text file has 5-500.00, which I would presume would be
brought in as a string, but it isn't. It is being brought in as
12/30/1899. But, I can take the same text file and open it in Excel and
that column is correct, showing the 5-500.00.

Help. I need to read their data and convert it, so I need to read it as
5-500.00 and not a bogus date.

Thanks
Darin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 21 '05 #1
0 862

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Loi Tan Vo | last post by:
Hi, I have a text file that contains a date column. The text file will be imported to database in SQL 2000 server. After to be imported, I want to convert the date column to date type. For...
2
by: Lauren Quantrell | last post by:
I have two columns in a table: StartDate DateTime and StartTime DateTime. The StartDate column holds a value such as 07/16/2004 The StartTime column holds a value such as 3:00:00 PM I want to...
3
by: Hans Merkl | last post by:
Hi, I was wondering if it's possible to bind the header text of a GridView column to a method of an object I have. At the moment I am setting the header texts in Page_Load but I was wondering if...
8
by: John Wildes | last post by:
Hello all I'm going to try and be brief with my question, please tell me if I have the wrong group. We are querying transaction data from a DB3 database application. The dates are stored as...
0
by: Yunus's Group | last post by:
Yunus's Group May 23, 3:36 pm show options Newsgroups: microsoft.public.dotnet.languages.vb From: "Yunus's Group" <yunusasm...@gmail.com> - Find messages by this author Date: 23 May 2005...
11
by: Dixie | last post by:
How can I programatically, take some Date/Time fields present in a table in the current database and change their type to text? dixie
0
by: zacks | last post by:
I am trying to use the Microsoft Text Driver to access data in a text file via ODBC calls. Everything has worked fine so far. I am now trying to implement support for a file that has a special...
9
by: NEWSGROUPS | last post by:
I have data in a table in an Access 2000 database that needs to be exported to a formatted text file. For instance, the first field is an account number that is formatted in the table as text and...
9
by: Marianne160 | last post by:
Hi, I know there are various answers to this problem available on the web but none of them seem to work for me. I am using Access 2003 to make a form to look up data from a table. I have so far...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.