jhonnyboy 1 Junior Poster in Training

Hello everyone. I am making a clock in - out program and have a more complex issue on hand. My program asks the user for their name then sends them to the clock in/out form. In the form they press a button which then stores the TIMEOFDAY into a .txt file. I would like to know how i could get all their hours and add them up to a .csv file. I am thinking i can subtract the clock in timeofDay from the clockout timeofDay to get the current hours they worked in a day. Then i would like to dump that number into a csv file with the format of Name, Time worked.

Now my question is how can i sort this by date? So when i open the.csv file i can see the users hours for the current week, the month and etc...