Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
rajanand2807
New Member

Convert the time format in custom column

Please tell me how to customize the column Time which is (HH:MM:SS) format and i want it in (MM:SS) format in power BI. What is the formula and steps to convert it ?

1 ACCEPTED SOLUTION
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @rajanand2807 ,

 

Below two options might meet your requirement.

Column =
FORMAT ( MINUTE ( TB2[Time] ), "00" ) & ":"
    & FORMAT ( SECOND ( TB2[Time] ), "00" )

Column 2 =
VAR _totalSec =
    HOUR ( TB2[Time] ) * 60 * 60
        + MINUTE ( TB2[Time] ) * 60
        + SECOND ( TB2[Time] )
RETURN
    INT ( _totalSec / 60 ) & ":"
        & FORMAT ( _totalSec - INT ( _totalSec / 60 ) * 60, "00" )

1.PNG2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @rajanand2807 ,

 

Below two options might meet your requirement.

Column =
FORMAT ( MINUTE ( TB2[Time] ), "00" ) & ":"
    & FORMAT ( SECOND ( TB2[Time] ), "00" )

Column 2 =
VAR _totalSec =
    HOUR ( TB2[Time] ) * 60 * 60
        + MINUTE ( TB2[Time] ) * 60
        + SECOND ( TB2[Time] )
RETURN
    INT ( _totalSec / 60 ) & ":"
        & FORMAT ( _totalSec - INT ( _totalSec / 60 ) * 60, "00" )

1.PNG2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.