Question How to read text file line by line?

raysefo

Well-known member
Joined
Jul 21, 2010
Messages
207
Programming Experience
Beginner
Hi,

I have a text file like below;

606;16
101 GAZ MET.MED. - VIC.BRANESTI 2011-01-11T11:00:00
102 BRASOV - TARGU MURES 2011-01-11T10:30:00
103 DUISBURG - F.FRANKFURT 2011-01-11T11:00:00
104 OBERHAUSEN - AACHEN 2011-01-11T11:00:00
105 OSNABRUCK - PADERBORN 2011-01-11T11:00:00
106 TRABZONSPOR - BUCASPOR 2011-01-11T11:00:00
107 CFR CLUJ - UNIV.CRAIOVA 2011-01-11T11:00:00
108 ANGERS - CHATEAUROUX 2011-01-11T11:00:00

what I would like to do is to search for exact date 2011-03-27 and change its time to 1 hour back.

How can I do it?
Thanks in advance.

Best Regards.
 
VB.NET:
Function Search(searchstring) as boolean
Dim sr as New System.IO.StreamReader("Yourfilename.txt")
Dim line as string = sr.readline
Do while not line is nothing
if line.contains(searchstring) then
return true
end if
line = sr.readline
Loop
return false
End Function

Something like that should work, should be a good strating point
 
Back
Top