Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

How to split HH:MM:SS in 3 columns

Hi Guys,

 

I have 13:25:55 and I need just one column with the seconds, 55.

I've already tried slipt column by delimiter : , but didn't work.

  • Anonymous's avatar
    Anonymous
    8 years ago

    Anonymous A cleaner way might be to use the HOUR, MINUTE, and SECOND functions to extract the values.

     

    -Parker

  • Hello Anonymous,

    You can use the HOUR, MINUTE and SECOND functions like this:

    Create 3 new columns with the following DAX:

     

    Hours = HOUR('Table1'[TimeColumn])
    Minutes = MINUTE('Table1'[TimeColumn])
    Seconds = SECOND('Table1'[TimeColumn])


    Here's the result:

3 Replies

  • Hello Anonymous,

    You can use the HOUR, MINUTE and SECOND functions like this:

    Create 3 new columns with the following DAX:

     

    Hours = HOUR('Table1'[TimeColumn])
    Minutes = MINUTE('Table1'[TimeColumn])
    Seconds = SECOND('Table1'[TimeColumn])


    Here's the result:

  • BFroc's avatar
    BFroc
    Frequent Visitor

    Make sure you use some of teh advanced options when you're using the split column by delimiter function. You want a Right split, and only the first delimiter.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous A cleaner way might be to use the HOUR, MINUTE, and SECOND functions to extract the values.

     

    -Parker