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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Convert time spent to time

I have a column time-spent:

 

1H3M

4H7M

2M

 

I need to convert de time to be comptable in excel. 

For example 1H30M will be in total hours 1.5h

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a new column

 

new column =
var _1 = SUBSTITUTE([column], "H", ".")
var _2 = SUBSTITUTE(_2, "M", "")
return
Quotient(_2*1,1) + (mod(_2,1)*10/6)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try a new column

 

new column =
var _1 = SUBSTITUTE([column], "H", ".")
var _2 = SUBSTITUTE(_2, "M", "")
return
Quotient(_2*1,1) + (mod(_2,1)*10/6)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
AilleryO
Memorable Member
Memorable Member

Hi,

 

Can you tell us exactly how is stored the time you want to convert.

Is it like you wrote 1h3m with the letters ? or more classic 01:03 ?

A screen copy of your data (not sensitive ones) might help us to help you 😉

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors