Forum Discussion
MarLinCH
2 years agoRegular Visitor
Formatting Text to Duration
Hi everyone, First time here, so I'm excited to get help - thank you very much. I receive a weekly update with data, including the time for certain calls. "Non ACD Calls in Time" and "Lo...
- 2 years ago
Thank you very much - I've also found sth. that worked:
let DurationFromYourText = (text as text) as duration => let Split = Text.Split(text, ":"), AsNumbers = List.Transform(Split, Number.FromText), Duration = #duration(0, AsNumbers{0}, AsNumbers{1}, AsNumbers{2}) in Duration, Invoked = DurationFromYourText([#"Logged On Time (Per Skill Group)"]) in Invoked
mlsx4
2 years agoMemorable Member
Hi MarLinCH
Ok, I think the problem is because you have duration over 24 hours. Try to apply this solution: https://community.fabric.microsoft.com/t5/Desktop/Duration-Error-over-24-00-00/td-p/1204481
MarLinCH
2 years agoRegular Visitor
Thank you very much - I've also found sth. that worked:
let
DurationFromYourText = (text as text) as duration => let
Split = Text.Split(text, ":"),
AsNumbers = List.Transform(Split, Number.FromText),
Duration = #duration(0, AsNumbers{0}, AsNumbers{1}, AsNumbers{2})
in
Duration,
Invoked = DurationFromYourText([#"Logged On Time (Per Skill Group)"])
in
Invoked