01-19-2006 02:32 PM - edited 03-13-2019 11:26 PM
does anyone know how to create Java steps to take 366 seconds and convert that to lets say 6 minutes and 6 seconds. So lets say Im doing the get reporting stat for expected wait time it returns the value in seconds I want to then convert that to minutes and seconds using java steps and then play it back on a container prompt.
Thanks,
Erik
01-19-2006 05:42 PM
Hi Erik.
Do you absolutely have to do this with Java?
You could do this simply with a Set step (in the General folder)
For example, if you a retrieving Expected Wait Time using Get Reporting Statistic and store it as variable WaitTime, you could do this:
Set WaitMinutes = WaitTime/60
(where WaitTime is an integer.)
Furthermore, if you want to "round up":
Set WaitSeconds = (WaitTime/60 - WaitMinutes) * 60
If (WaitSeconds >=30) Then
--+True
----Increment WaitMinutes
--+False
----(empty)
Hope this helps,
Mark
01-20-2006 08:18 AM
Hey Mark,
your absolutely right I did not think of that.
Thanks you for your response.
Erik
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide