Forum Discussion
efilipe
Helper IV
8 years agoDecimal to HH:MM:SS
Hi guys, I have numbers with decimals, like: 19,400 8,50 14,70 56,000 The are miliseconds of videos. I need to transform that to HH:MM:SS. Is it possible? And after, will the column...
- 8 years ago
Hi efilipe,
Please create a measure below:
HH:MM: SS = RIGHT ( "0" & INT ( SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) / 3600000 ), 2 ) & ":" & RIGHT ( "0" & INT ( ( SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) - INT (SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) / 3600000 ) * 3600000 ) / 60000 ), 2 ) & ":" & RIGHT ( "0" & INT(DIVIDE(MOD (SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]), 60000 ), 1000)), 2 )Best Regards,
Qiuyun Yu
v-qiuyu-msft
Community Support
8 years agoHi efilipe,
Please create a measure below:
HH:MM: SS = RIGHT ( "0" & INT ( SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) / 3600000 ), 2 )
& ":"
& RIGHT (
"0"
& INT ( ( SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) - INT (SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]) / 3600000 ) * 3600000 ) / 60000 ),
2
)
& ":"
& RIGHT ( "0" & INT(DIVIDE(MOD (SUMX('Miliseconds2HH:MM: SS', 'Miliseconds2HH:MM: SS'[Miliseconds]), 60000 ), 1000)), 2 )
Best Regards,
Qiuyun Yu