start and finish times as a notesdate time.
Function TimeTaken(StartTime as NotesdateTime, FinishTime as NotesDateTime) As
Dim diff As Long
Dim min As Integer, hr As Integer, sec As Integer
Dim sMin As String, sHr As String, sSec As String
diff = FinishTime.TimeDifference(StartTime)
sec = Fix(Fraction ((diff/86400)*(60*24) ) * 60) ' done this cus min is
hr = Fix((diff/86400)*(24))
sSec = Cstr(sec)
sMin = Cstr(min)
sHr = Cstr(hr)
If sec < 10 Then sSec = "0" & sec
If min < 10 Then sMin = "0" & min
If hr < 10 Then sHr = "0" & hr
If diff < 60 Then
TimeTaken = "00hrs 00mins "& sSec & "secs"
Elseif diff < 1000 Then
TimeTaken = "00hrs " & sMin & "mins " & sSec & "secs"
TimeTaken = sHr & "hrs " & sMin & "mins " & sSec & "secs"