Forum Discussion

harshjoshiD's avatar
harshjoshiD
Frequent Visitor
4 years ago
Solved

Days.Time to Text

Hello all 🙂   I have a pbix file which contains a column of Time calculation in the format of Days.hh:mm:ss (shown below): I want to convert it to Text format i.e 4 Days 07 Hours 56 Minutes...
  • amitchandak's avatar
    4 years ago

    harshjoshiD , It should be a duration column in the Power query, then you can have a new column  like

     

    = Number.ToText(Duration.Days([Time to Mitgate]) ) & " Days " &

    Number.ToText(Duration.Hours([Time to Mitgate]) ) & " Hours" &

    Number.ToText(Duration.Minutes([Time to Mitgate]) ) & " Minute" &

    Number.ToText(Duration.Seconds([Time to Mitgate]) ) & " Second"