i can't find the code to read for particular info from textfile. is that even possible?

eg. [data store in text file]
01/11/2009 12:30:22,1
01/11/2009 12:35:22,2
01/11/2009 12:55:22,1
01/11/2009 13:30:22,0
01/11/2009 13:59:22,1
01/11/2009 14:30:22,0
02/11/2009 15:30:22,1
02/11/2009 15:45:22,0
02/11/2009 16:30:22,1
02/11/2009 16:55:22,0

and i'm calling the date 01/11/2009

so the system will read all data in 01/11/2009
how do i go about doing that and than after read i need to display the data on to the grid
with separation of
date one column time one column

hope to find solution as soon as possible

Try something like "Read the textfile and push into some hashtable and search using the datekey".

1.Save ur test file in to the local hard disk whether d: or e:

2.Using this code and execute in the Sql server 2005

create table #testDate(myDate varchar(50),MyNo int)

Bulk insert #testDate from 'd:\testdate.txt' WITH
(
FIELDTERMINATOR =',',
ROWTERMINATOR ='\n'
)

select substring(mydate,0,11) MyDate,myno from #testdate

3. Now u can get wat u want...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.