Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
masplin
Impactful Individual
Impactful Individual

Truncate HI:MM;SS to HI:MM in power query

I have raw date with times in hh:mm:ss format, but I only need the hh:mm bit.  Is there a straight forward way to achieve this to reduce cardinality?  I have seperately created hour and minute colums , but cant see how to recombine them to make a column that is recognisable as a time?

 

Thnaks

Mike

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@masplin

 

Hi, check the image :

 

Time.gif

 

Regards

 

Victor

Lima - Peru




Lima - Peru

View solution in original post

5 REPLIES 5
Vvelarde
Community Champion
Community Champion

@masplin

 

Hi, In Query Editor:

 

Change to Text Type - in a New Step

Change again to Time - in a New Step

 

Ready

 

Victor




Lima - Peru
masplin
Impactful Individual
Impactful Individual

Is that just on the orignal raw data column that is in hh:mm;ss?

 

Thnaks

masplin
Impactful Individual
Impactful Individual

That just errors as cannot convert the  text date back to a time?

Vvelarde
Community Champion
Community Champion

@masplin

 

Hi, check the image :

 

Time.gif

 

Regards

 

Victor

Lima - Peru




Lima - Peru
masplin
Impactful Individual
Impactful Individual

ah my time was formatted 01/01/1743 13:12:34  i.e. the date is a null the way it was stored so your method error. If i split the column to just have a time it works, but you have to cnvert the text that resuts form a split into time, then back to text, then back to time!!!!

 

Thanks for help

 

funny they dont just have a function for that

 

 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.