I wrote this up for you. I think it will help. what I would recommend is doing these calculations before inserting intot he database. if you don't want to got that route then you can replace the start and finish variables with recordset values to get the same results.
hope this helps!
<% ' I worked out two solutions just with different formats in the total results hope this helps
' note do these calculations before you insert into the table
%>
<%
'this is exactly what you wanted that being a result of minutes
'these would be the querystrings of course
dim strt1, finish1, totalT1
'declare the variables
strt1 = FormatDateTime("1:25 PM", 4)
' format into 24 hour time
finish1 = FormatDateTime("3:00 PM", 4)
response.write "start time " & strt1 & "<br>finish time " & finish1 & "<br>"
'test it
totalT1 = DateDiff("n", strt1,finish1)
' get the difference in minutes
response.write "total minutes " & totalT1 & "<br>"
'insert variables into the DB now
%>
<%
'this example is better if you want the total to be actual time values and not just minutes
dim strt, finish, totalT, CS, CM, CH
strt = FormatDateTime("1:25 PM", 4)
' format into 24 hour time
finish = FormatDateTime("3:00 PM", 4)
response.write "start time " & strt & "<br>finish time " & finish
'test it
totalT = DateDiff("s", strt,finish)
' get the difference in seconds
'below we format the total seconds into workable time for payment value
CS = totalT mod 60
IF Len(CS) = 1 Then
CS = "0" & CS
End If
CM = (totalT mod 3600) \ 60
IF Len(CM) = 1 Then
CM = "0" & CM
End If
CH = totalT \ 3600
IF Len(CH) = 1 Then
CH = "0" & CH
End If
converted = CH & ":" & CM & ":" & CS
response.write "<br>just a better looing format, giving actual hours, minutes and seconds " & converted
'insert the data into the database now
'strt finish and converted
%>
admin@onpntwebdesigns.com