Forum Discussion

cherubmom's avatar
cherubmom
New Member
8 years ago
Solved

Convert text to minutes

I have a column that has duration as a text string "1h 48m". Is it possible to covert this to a decimal hour or minutes (i.e. 60)?

  • cherubmom in power query i would

    1. split the column into 2 with the space delimiter

    2. remove the m and h from both columns using replace ie. replace h with  "" blank (you dont need to use the "")

    3. convert the hours into minutes depend on what you want

    4 add the columns back together

    5 change it to a whole number

1 Reply

  • vanessafvg's avatar
    vanessafvg
    Community Champion

    cherubmom in power query i would

    1. split the column into 2 with the space delimiter

    2. remove the m and h from both columns using replace ie. replace h with  "" blank (you dont need to use the "")

    3. convert the hours into minutes depend on what you want

    4 add the columns back together

    5 change it to a whole number