I have 2 lines, strStartTime and strEndTime.
strStartTime = "12:32:54" strEndTime = "12:33:05"
I want to know how many seconds elapsed between strStartTime and strEndTime, so I did this:
Dim dtDuration as date dtDuration = DateDiff("s", CDate(strStartTime), CDate(strEndTime))
The result I get is dtDuration = "# 1/10/1900 #" in the locale viewport.
Why is this happening? How to get dtDuration equal to 11 in 11 seconds elapsed between the start and end time?
source share