The Start/End Time question type in a TouchPoint, when used in a Results report, creates 2 separate objects, one for the Start Time entered, and one for the End Time.  Both of these values are stored as plain text, making it difficult to calculate the actual duration of time between them.  The following formulas can help you calculate the actual amount of time spent between the Start and End times entered on a TouchPoint response.

  1. Create a variable in your report with the following formula, substituting your Start Time and End Time objects for [Start Time] and [End Time]:
    =(ToNumber(Left([End Time];2))*60)+ToNumber(Substr([End Time];4;2)) + (If(Right([End Time];2)) = "PM" And (Left([End Time];2) <>"12") Then 720)-((ToNumber(Left([Start Time];2))*60)+ToNumber(Substr([Start Time];4;2)) + (If(Right([Start Time];2)) = "PM" And (Left([Start Time];2) <>"12") Then 720))
  2. This variable will return the number of minutes between the Start Time and End Time.  To convert this to "hours:minutes" format, you can use the following formula, substituting the name of the variable you created above for [Minutes Spent]:
    =Floor([Minutes Spent]/60)+":"+FormatNumber(Mod([Minutes Spent];60);"00")

Please note that use of these formulas require that the Start Time and End Time must refer to the same day, and the Start Time must be earlier than the End Time, or you will receive incorrect results.

Did this answer your question?