Forum Discussion

libertus's avatar
libertus
Frequent Visitor
8 years ago
Solved

Transform aggregated hours as Text to Time

Is there a way to transform this Column that holds hours and minutes (stored is text in the Query) to time hours and minutes:

 

00:09

14:30

74:45

23:30

31:15

ertc...

 

Problems arise with the aggegated working hours on a machine that are above 24:00 hours. They will raise an error when you transform to time.

 

All help appreciated, Bert

  • libertus

     

    You can only transfrom this text column into a "Duration" type column. Just add a custom column like below:

     

    =#duration(0,Number.FromText(List.First(Text.Split([Time],":"))),Number.FromText(List.Last(Text.Split([Time],":"))),0)

     

    Regards,

2 Replies

  • v-sihou-msft's avatar
    v-sihou-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    libertus

     

    You can only transfrom this text column into a "Duration" type column. Just add a custom column like below:

     

    =#duration(0,Number.FromText(List.First(Text.Split([Time],":"))),Number.FromText(List.Last(Text.Split([Time],":"))),0)

     

    Regards,