Thank you for taking the time to read my question.
I'm wondering how to use DateDiff() to calculate the hours, minutes and seconds between the first record in my collection and the last record in my collection.
I found a post to do the hours and minutes which works, but I tried to keep the same format and add seconds but it's not working as expected.
If a few seconds pass, I also get a value for the minutes.
Here is my code... am I close?
If(IsEmpty(colLocHist),"","Travel Time: " & DateDiff(First(colLocHist).CaptureDateTime,Last(colLocHist).CaptureDateTime,Hours) & ":" & If(Len(Text(Mod(DateDiff(First(colLocHist).CaptureDateTime,Last(colLocHist).CaptureDateTime,Minutes),60)))=1,"0"&Mod(DateDiff(First(colLocHist).CaptureDateTime,Last(colLocHist).CaptureDateTime,Minutes),60),Mod(DateDiff(First(colLocHist).CaptureDateTime,Last(colLocHist).CaptureDateTime,Minutes),60))) & ":" & If(Len(Text(Mod(DateDiff(First(colLocHist).CaptureDateTime,Last(colLocHist).CaptureDateTime,Seconds),60)))=1,"0"&Mod(DateDiff(First(colLocHist).CaptureDateTime,Last(colLocHist).CaptureDateTime,Seconds),60),Mod(DateDiff(First(colLocHist).CaptureDateTime,Last(colLocHist).CaptureDateTime,Seconds),60))
Thanks!