visual basic difference in dates between two lines in text file -
i new vb express , looking way read 2 lines in text file difference between , loop till end simple clock in clock out scheme store each persons clock on , off time in text file so
03/11/2014 09:55:02 03/11/2014 14:55:02 03/11/2014 16:55:02 03/11/2014 19:55:02 04/11/2014 09:00:02 04/11/2014 13:00:00
i know utilize datediff time want them work out difference between line 1 , 2 3 , 4 , add together them possible without on complicating things?
i guys have worked out have done reading text filed line line in loop @ moment have not set validation in show people have forgot basics there
dim file_name string = "times\08.txt" dim start datetime dim finish datetime dim total if system.io.file.exists(file_name) = true dim objreader new system.io.streamreader(file_name) while objreader.peek() <> -1 start = objreader.readline() & vbnewline finish = objreader.readline() & vbnewline duration = datediff(dateinterval.minute, start, finish) total = duration + total loop label2.text = total
visual-studio-2010
No comments:
Post a Comment