R
Robert
I am trying to write the total processing time to a log file so I know
exactly how long my program takes to complete. I'm guessing the
variable iTotalSec isn't recognized as a number. Here's the function:
Public Function DeltaTime(dStart As Date, dStop As Date)
Dim iDay(2) As Double
Dim iHour(2) As Double
Dim iMin(2) As Double
Dim iSec As Double
Dim iTotalSec As Double
Dim Result As Double
Result = Evaluate("mod(3489936500, 1348993650)") '<= I tested this and
it works fine
iTotalSec = DateDiff("s", dStart, dStop)
iDay(0) = Evaluate("Int(iTotalSec/86400)") '<= This returns a type
mismatch.
iDay(1) = Evaluate("mod(iTotalSec,86400)")
iHour(0) = Evaluate("Int(iDay(0)/3600)")
iHour(1) = Evaluate("mod(iDay(1),3600")
iMin(0) = Evaluate("Int(iHour(0)/60)")
iMin(1) = Evaluate("mod(iHour(1),60)")
iSec = iMin(1)
AddToLog "Completed Audit in " & iDay(0) & " Days, " & iHour(0) & "
Hours, " _
& iMin(0) & " Minutes, " & iSec & " Seconds."
End Function
Is there a way to use the value of iTotalSec instead of the string in
the mod and int functions?
exactly how long my program takes to complete. I'm guessing the
variable iTotalSec isn't recognized as a number. Here's the function:
Public Function DeltaTime(dStart As Date, dStop As Date)
Dim iDay(2) As Double
Dim iHour(2) As Double
Dim iMin(2) As Double
Dim iSec As Double
Dim iTotalSec As Double
Dim Result As Double
Result = Evaluate("mod(3489936500, 1348993650)") '<= I tested this and
it works fine
iTotalSec = DateDiff("s", dStart, dStop)
iDay(0) = Evaluate("Int(iTotalSec/86400)") '<= This returns a type
mismatch.
iDay(1) = Evaluate("mod(iTotalSec,86400)")
iHour(0) = Evaluate("Int(iDay(0)/3600)")
iHour(1) = Evaluate("mod(iDay(1),3600")
iMin(0) = Evaluate("Int(iHour(0)/60)")
iMin(1) = Evaluate("mod(iHour(1),60)")
iSec = iMin(1)
AddToLog "Completed Audit in " & iDay(0) & " Days, " & iHour(0) & "
Hours, " _
& iMin(0) & " Minutes, " & iSec & " Seconds."
End Function
Is there a way to use the value of iTotalSec instead of the string in
the mod and int functions?