ironhide1975
Programmer
I'm sure this is really simple but I'm having a hard time finding an example. I want to do a time compare before an ASP page starts a calculation and when it ends. I am somewhat close with this but I can't get the write formatting of this with seconds and minutes. Can someone help me clarify this forumla?
Code:
<%
todaysDate=now()
StartTime = FormatDateTime(todaysDate,3)
'lots of stuff happen here
todaysDate=now()
EndTime = FormatDateTime(todaysDate,3)
DiffTime = DateDiff("s",StartTime,EndTime)
DiffTime = FormatDateTime(DiffTime,3)
h1 = (DateDiff("h",StartTime,EndTime))
n1 = (DateDiff("n",StartTime,EndTime))
s1 = (DateDiff("s",StartTime,EndTime))
%>
Time Difference <%=h1 %>:<%=n1 %>:<%=s1 %> <br />