Skip to main content

Calculate-Time-Difference

Command Description

Compare two times to get the time difference in the specified unit

Command Prototype

iRet = Time.DateDiff(sUnit,dTime1,dTime2)

Parameter Description

ParameterRequiredTypeDefaultDescription
sUnitTrueenum"s"The time unit to be changed
dTime1TrueexpressiondTime1Time to compare
dTime2TrueexpressiondTime2Time to compare

return

iRet,The variable used to save the output of the command.

Demo

Dim iRet 
iRet = Time.DateDiff("s",44601.0,44602.0)
TracePrint(iRet)
/**
iRet 86400
*/