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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Date time formatting for more than 24 hour

Hi,

I have date time format [h]:mm:ss in excel file. When I import that file it automatically convert to 01/01/1900 05:28:10 AM rather than showing the same format I have in excel. I belive this is because in excel I converted custom format to "[h]:mm:ss" but in Power BI custom format for [h] for more than 24 hour is not supported or available.
I want to ask this question from genious here, Do we have any other option to import over 24 h:mm:ss format for e.g 50:24:20 in power query editor.
In the end I need seconds but I am not sure if I cannot split hour:minute:second into correct format how it will be possible.

Thanks.

1 ACCEPTED SOLUTION

Excel stores durations as days and fractions of a day. You can set the cell format to show hours:minutes:seconds.fractions_of_seconds. However, you cannot change what you see in the formula bar if the cell is formatted as [h]:mm:ss.000

 

In Power Query, hours > 24 will be shown as Days in the duration typed column.

In Power BI, duration will be shown as a decimal number.

 

Neither will show the [h]:mm:ss format you can see in an Excel cell.

 

If that is an absolute requirement, you could construct a text string, I suppose.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Thank you @Greg_Deckler , I converted this to duration but issue is duration can only show up to 24 hour time if I have more than 24 hours in h:mm:ss format it gives me the incorrect hour duration. Would there be any other alternative to convert into second in excel or somewhere else. as in excel it also show me the date time format when I double click on cell in excel.

Excel stores durations as days and fractions of a day. You can set the cell format to show hours:minutes:seconds.fractions_of_seconds. However, you cannot change what you see in the formula bar if the cell is formatted as [h]:mm:ss.000

 

In Power Query, hours > 24 will be shown as Days in the duration typed column.

In Power BI, duration will be shown as a decimal number.

 

Neither will show the [h]:mm:ss format you can see in an Excel cell.

 

If that is an absolute requirement, you could construct a text string, I suppose.

Greg_Deckler
Super User
Super User

@Anonymous Try converting it to a duration column.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

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