Get the count of login datetime and username from the textfile
- by user2897388
I am having a textfile with usename, userid, login and logout time.
From this textfile I need to get the userid and howmany times that user logged in on that particular date. I am doing this one using C# (.NET) in windows applications.
I tried this code but I am getting the whole text into the string strRead. In that strRead I need to get the count of user login basing on date.
StreamReader strmrdr = new StreamReader("Logfiles.txt");
string strRead = strmrdr.ReadToEnd();
Username:Rajini||UserId:abc||Userlogintime:10/19/13 12:33:29 PM||UserLogoutTime:10/19/13 12:33:57 PM
Username:Rajini||UserId:abc||Userlogintime:10/19/13 12:35:29 PM||UserLogoutTime:10/19/13 12:36:57 PM