Hi everyone,
I need to transform a decimal value to a time.
Example: instead of 2.5, I need to display 2:30 (2 minutes 30 seconds).
How can I do that?
Thanks in advance
Hi everyone,
I need to transform a decimal value to a time.
Example: instead of 2.5, I need to display 2:30 (2 minutes 30 seconds).
How can I do that?
Thanks in advance
You can use the duration data type for this.
Hi Poppins ,
As Erik Said You can use Duration Datatype To Get Fraction to Words But it would Take input as Hours like Your Example
2.5 it Would display as 2 hours 30 minutes. So to Get in minutes and Secs you have to Reduce Decimal Further by 60…
To get in Minutes
DecimalVar := DecimalVar/60.00; //DecimalVar=2.5
EVALUATE(DurationVar,FORMAT(ROUND(DecimalVar,0.0001,’>’)));
MESSAGE(FORMAT(DurationVar)); // 2 minutes 30seconds