Re: Time Duration formatting
What is the Values of the Arrary strline?
Re: Time Duration formatting
_________________________________________________________________
Event Time: 2006-05-01 12:01:00
Problem Text:
*** ALARM 174 A1/EXT "BSC01 R11/ACA3/"U 060501 1201
RADIO X-CEIVER ADMINISTRATION
BTS EXTERNAL FAULT
MO RSITE CLASS
RXOCF-131 MDLH1199 1
EXTERNAL ALARM
GENSET IN OPERATION
END
Problem Data:
PRCA=53
Clear Time: 2006-05-01 12:03:00
_________________________________________________________________
Thanks for reply mate
Above given block is in that array and i m trying to get duration between event time and clear time ....
Regards
Waiting
Re: Time Duration formatting
How about this:
VB Code:
Option Explicit
Private Function GetTime(strline As String) As String
Dim dtEventDateTime As Date
Dim dtClearDateTime As Date
dtEventDateTime = CDate(Mid(strline, InStr(strline, "Event Time: ") + 12, 19))
dtClearDateTime = CDate(Mid(strline, InStr(strline, "Clear Time: ") + 12, 19))
GetTime = DateDiff("n", dtEventDateTime, dtClearDateTime) & _
" minutes Difference Between Event Time and Clear Time"
End Function
Private Sub Command1_Click()
Dim strline As String
Debug.Print GetTime(strline)
End Sub
Re: Time Duration formatting
Didn work
"by ref argument type mismatch"
isnt there some other way , i m really frustrated about this "lil " issue :cry:
Regards
Re: Time Duration formatting
Quote:
Originally Posted by Dastard
Didn work
"by ref argument type mismatch"
isnt there some other way , i m really frustrated about this "lil " issue :cry:
Regards
What type of variable is "strline"?