11-09-2012 12:37 AM
If I have an integer holding the number of seconds, how can I convert it into a string/relavant format in the form Hours:Minutes:Seconds?
For example, 123 seconds should be 00:02:03.
If it is possible to do the above, then how can I seperate it into 00 Hours indicator, 02 Minutes indicator and 03 Seconds indicator?
11-09-2012 12:53 AM
You can do that manually. For one of my project I have made the calculation to convert the seconds to time. This will convert the seconds into to only Hours Minutes and seconds and not into the actual time format.
Good luck
11-09-2012 01:14 AM - edited 11-09-2012 01:20 AM
11-09-2012 03:31 AM
Optimization ends here.
11-09-2012 06:14 AM
/Y
11-09-2012 07:52 AM - edited 11-09-2012 07:54 AM
@Yamaeda wrote:
/Y
But this will convert the hours to days once it exceeds 24. Also you don't have to convert you can wire the seconds directly.
11-09-2012 08:11 AM - edited 11-09-2012 08:11 AM
Here's another way to do it. Format you DBL indicator to display absolute or relative time.
11-09-2012 08:32 AM
And Wayne's can be simpler if you dont mind the coercion dot. 😄
It does however have a 1 hour add, causing 123 to turn into 01:01:59
/Y
11-09-2012 08:39 AM - edited 11-09-2012 08:40 AM
@Yamaeda wrote:
And Wayne's can be simpler if you dont mind the coercion dot. 😄
It does however have a 1 hour add, causing 123 to turn into 01:01:59
/Y
Keep it as relative time and you don't. I'm thinking the Absolute Time will get adjusted due to time zones. Mine is showing 19:02:03 when set to absolute time (Eastern Time = -5 from GMT).
11-09-2012 08:40 AM
Altenbach already did it the absolute simplest way to do it. Format an Integer indicator to display time. I added the DBL version just to remind people that you can do the same with a DBL as well. You can also get fractions of a second as well if dealing with a true timestamp.