Who would have thought working with times would be so hard? This is what I've been having problem with for a few days and I'm absolutely dumbfounded!
The second msgbox shows the right time, almost. Since it's trimming down characters, if it's more than 10 seconds it cuts it off to just one digit.
So I tried to fix that problem with Format:ing the string but it literally prints out: #.### instead of the numbers. I think part of the problem is it's in DateTime format and it has 0:0:0 or such prepended to the time.
I am SO confused and not making any progress on this timer.
The second msgbox shows the right time, almost. Since it's trimming down characters, if it's more than 10 seconds it cuts it off to just one digit.
So I tried to fix that problem with Format:ing the string but it literally prints out: #.### instead of the numbers. I think part of the problem is it's in DateTime format and it has 0:0:0 or such prepended to the time.
I am SO confused and not making any progress on this timer.
Code:
Dim _startTime As DateTime
Dim _stopTime As DateTime
.
.
.
_stopTime = Now ' intiate the endtime NOW
Dim _totalSeconds As String
_totalSeconds = _stopTime.Subtract(_startTime).ToString
MsgBox((Format(_totalSeconds, "#.###")))
_totalSeconds = _totalSeconds.ToString().Remove(0, 7)
'_totalSeconds = _totalSeconds.ToString().Remove(2, 3)
MsgBox("Reaction time = " + _totalSeconds + " sec")