Atul_Rai
(Atul Rai)
1
Hi,
I have a text file which contain the time and some text in the sequence.
e.g. 4:00 ijk , 5:30 abc , 6:00 zyz , 7:00 pqr , 9:30 def
Now I want to remove the text if the current time is 5:30 and the the file will be
5:30 abc , 6:00 zyz , 7:00 pqr , 9:30 def
Then at 6:00 is should be
6:00 zyz , 7:00 pqr , 9:30 def
and so on. Is there any solution for this scenario?
TimK
(Tim Kok)
2
You can use substring and index of to locate the current time to remove everything before
i.e. String.Substring(String.IndexOf(“5:30”))
rahatadi
(Aditya Rahatekar)
3
@Atul_Rai
Read text file
Use
String.Substring(string.indexOf(now.tostring("“h:mm”)))