I am writing a script that requires to determine how long the duration between two date/time. The date/time format is as 11/15/2006 9:08:23 PM to the date/time returned by the Now function.
I tried the DateDiff function as follows:
dtmStartTime = "11/02/2006 9:08:23 PM"
strElapsedTime = DateDiff("s", dtmStartTime, Now)
This only returns seconds.
The parameters are: "h" = hours; "n" = minutes; "s" = seconds.
Therefore, the DateDiff function only returns hours, minutes or seconds separately and never combines them into hh:mm:ss format.
Is there any way to do that in VBScript?
Thanks in advance!
CluM09
I tried the DateDiff function as follows:
dtmStartTime = "11/02/2006 9:08:23 PM"
strElapsedTime = DateDiff("s", dtmStartTime, Now)
This only returns seconds.
The parameters are: "h" = hours; "n" = minutes; "s" = seconds.
Therefore, the DateDiff function only returns hours, minutes or seconds separately and never combines them into hh:mm:ss format.
Is there any way to do that in VBScript?
Thanks in advance!
CluM09