Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Good morning.
I have a question regarding how to convert a text data that has a certain mask to a time field.
The data is provided by excel and in one of the fields I receive hours with the following format.
7h 30m
6h 50m
From this column I would like to extract another commune with time format.
Thank you
Solved! Go to Solution.
Thank you for the proposal, in the end I have chosen to separate the text into two parts, what is before the "h" and what is behind, with that I build a text with 00:00 format and from here I convert to time.
Best regards.
You can go to the table in your Power Query Editor (Transform Data), and add a custom column.
I managed to transform it to this:
Then you can change that data type to time.
Here is the formula:
let splitTime = Splitter.SplitTextByDelimiter("h", QuoteStyle.None)([Time]) in Text.Combine({Text.Middle([Time], 3, 1), Text.Combine(List.Transform(splitTime, each Text.Start(_, 2)), ":")})
I hope it works for you.
Thank you for the proposal, in the end I have chosen to separate the text into two parts, what is before the "h" and what is behind, with that I build a text with 00:00 format and from here I convert to time.
Best regards.
User | Count |
---|---|
98 | |
75 | |
74 | |
49 | |
26 |