04-05-2024 07:55 AM
Hi guys,
I have to convert decimal number like 11.02, 73.56 to 00:00:11 or 00: 01:56 time format.
Can anyone guide me how to solve this problem?
Solved! Go to Solution.
04-05-2024 08:13 AM - edited 04-05-2024 08:14 AM
04-05-2024 08:38 AM
Just change the display format for Time Output
04-05-2024 09:44 AM - edited 04-05-2024 11:06 AM
@Hk637 wrote:
I have to convert decimal number like 11.02, 73.56 to 00:00:11 or 00: 01:56 time format.
The term of your problem are poorly defined and it would help to attach some simple code that contains what you actually have. The correct solution critically depends on the exact definitions. I assume the input values are in units of seconds, right? The word decimal is a cosmetic property how a value is presented, not a datatype.
Your "decimal number" of 11.02 could be:
Your "time format" of 00:00:11 could be :
Also please explain the math behind turning "73.56" into "00:01:56". Shouldn't that be roughly "00:01:13"?
Once we have the correct definition of the problem, the solution will be trivial. If possible, you should also define what should happen for much larger inputs. For example if the input value corresponds to more than 24 hours, do you also want days or just larger hour values?