cancel
Showing results for
Did you mean:

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Frequent Visitor

## How to convert the text value "50:23:06" to seconds in Power Query,

1 ACCEPTED SOLUTION
Solution Sage

Add a custom column in the query editor and put this expression in the pop-up box.

``````let
hms = List.Transform(Text.Split([Other Work], ":"), each Number.From(_)),
result = hms{0}*60*60 + hms{1}*60 + hms{2}
in
result``````

Pat

Microsoft Employee
4 REPLIES 4
Solution Sage

Add a custom column in the query editor and put this expression in the pop-up box.

``````let
hms = List.Transform(Text.Split([Other Work], ":"), each Number.From(_)),
result = hms{0}*60*60 + hms{1}*60 + hms{2}
in
result``````

Pat

Microsoft Employee
Frequent Visitor

Thank you so much ! it works perfectly for me!

Super User

Hi @AAAbbbnewbie :

- First, in Power Query, separate the time by character : (You will get three columns: hours,minutes and seconds).

-Then, create a custom column:

``Time= [Other work Hours]*3600+[Other work Minutes]*60+[Other work Seconds]``

Frequent Visitor

Thanks for sharing 🙂