How to calcuate time duration from 2 time strings?
Posted on 2011-03-21
I am having writers block. I would like to calculate the time duration from 2 strings that are input by the user. I know I need to convert the strings to date/time format or integer. The time strings would look something like this; start time - 10:35:22.189 and end time - 11:41:12.120. Also, notice I need milliseconds. Because I am working with just time, I am having trouble determining which calendar/date function to use because they involve using the date as well. Instead of date, the user is entering the Day of Year, so it is any integer that is within the 1 to 365 days. So, the timestamp format would be 219/10:35:22.189. What is the best method to use for this calculation? Any resources, recommendations or examples would be very helpful. Thank you.