04-21-2018, 11:06 AM
It can be done using several ways by using custom functions or built in functions in VB Script.
If the time is always in this format hhmm, you just need to introduce a colon : between hh & mm and pass the result to TimeValue built in function.
Here is how:
If the time is always in this format hhmm, you just need to introduce a colon : between hh & mm and pass the result to TimeValue built in function.
Here is how:
Code:
Dim t24hr, t12hr
t24hr = "1430"
t24hr = Replace(t24hr, Right(t24hr,2), ":" & Right(t24hr,2))
t12hr = TimeValue(t24hr)
msgbox t12hr
Want to fast track your QTP/UFT Learning? Join our UFT Training Course