Forum Discussion

MarLinCH's avatar
MarLinCH
Regular Visitor
2 years ago
Solved

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...
  • MarLinCH's avatar
    MarLinCH
    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