Forum Discussion
Converting Decimal Hour to HH:MM Format
- 4 years ago
Try this column
Column = VAR _hours = INT('Table'[TIMEDECHOURS]) VAR _minutes = ROUND(('Table'[TIMEDECHOURS]-_hours)*60,0) RETURN RIGHT("0"&_hours,2)&":"&_minutesWith above code, the column is of Text type. If the hours part is larger than or equal to 100 hours, it would return an incorrect value. You need to modify the hours part in that case. And I used ROUND function for minutes part. You could replace it with ROUNDUP or ROUNDDOWN if needed.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Try this column
Column =
VAR _hours = INT('Table'[TIMEDECHOURS])
VAR _minutes = ROUND(('Table'[TIMEDECHOURS]-_hours)*60,0)
RETURN
RIGHT("0"&_hours,2)&":"&_minutes
With above code, the column is of Text type. If the hours part is larger than or equal to 100 hours, it would return an incorrect value. You need to modify the hours part in that case. And I used ROUND function for minutes part. You could replace it with ROUNDUP or ROUNDDOWN if needed.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.