Forum Discussion
Duration conversion issue (CVS)
- 9 years ago
I just made a small working sample.
First I duplicated the Duration column. Then I used the "Split Column" function. That created 3 columns containg hours, minutes and seconds.
Hope this works with your data, too!
JJ
Thanks for such a quick suggestion. This is actually what I tried first but unfortunately, when converting the column to 'Text' (I'm doing this within the Query Editor, it converts to the following, which I can't parse since it's no longer a duration (these are the same values as I pasted above so as an example, 00:30:00 (30 mins) is converted to 12:30 AM:
Is there a different way to convert that you had in mind? It doesn't work once the import has completed since any hours >24 error out during import.
I just made a small working sample.
First I duplicated the Duration column. Then I used the "Split Column" function. That created 3 columns containg hours, minutes and seconds.
Hope this works with your data, too!
JJ
- Sean9 years agoCommunity Champion
Duration Data Type
https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/8814178-field-of-duration-type
Please Vote! :smileyhappy:
- acrscotland9 years agoNew Member
This is perfect, thanks!! I realized that somewhere along the line I can converted the column to something else along the way and that screwed me up. This solution has me up and running - thanks!
- Sean9 years agoCommunity Champion
Alternatively :smileyhappy:
Add Column tab => select column => Time button => Hour
repeat 2 more times => select column => Time button => Minute and then again for a Second column
- DoubleJ9 years agoSolution Supplier
nice solution!
- DoubleJ9 years agoSolution Supplier
you're welcome, glad I could help :-)