aPrivett
7 years agoOccasional Contributor
Need utilitiy to format milliseconds to a time format like hh:mm:ss to save in the Log
In keyword testing (preferred), does TestComplete provide something that I can give a parameter of milliseconds like 7500 and it provides a pretty time, like 7:30. I believe I've exhausted all av...
- 7 years ago
There is no built in utility that I know of to do what you're asking. You will have to write some sort of custom code to convert a millisecond measurement to seconds.
Technically speaking, 7500 converted to a "pretty" time is simply 7.5 seconds. It's simply a matter of doing an arithmetic operation after converting your string to a number. In JavaScript, it would look something like
function millisecondsToSeconds(time){ return (aqConvert.VarToInt(time) / 1000); }