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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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