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.
Hi all,
I have a Begin Time column of type date/time with data like:
Begin Time
01-01-1998 05:56:12
01-01-1998 07:15:58
How can I convert this in Power Query to just showing time in a format with hours and minutes (NOT seconds)?
Like this:
Begin Time
05:56
07:15
Hope that you can help.
Best regards,
Jacob
Solved! Go to Solution.
Hi @SanchezDK
You may refer to below:
= Table.TransformColumns(Source, {{"Begin Time", each Text.BetweenDelimiters(_, " ", ":", 0, 1), type text}})
Regards,
Cherie
@SanchezDK Please try this.. as as new column in Power Query
= Table.AddColumn(#"Changed Type", "Text Between Delimiters", each Text.BetweenDelimiters(Text.From([DateTimeVal], "en-GB"), " ", ":", 0, 1), type text)
Proud to be a PBI Community Champion
Hi pattemmanohar,
Thank you for your reply. Your solution would work. However, I was looking for a way to transform the current column (instead of adding a new) and keeping the time format (without the seconds).
Best regards,
Jacob
Hi @SanchezDK
You may use 'Format' for the column as below:
Regards,
Cherie
Hi and thank you for uour reply. This is a very nice feature - however, I cannot figure out to do the same in Power Query.
Hi @SanchezDK
You may refer to below:
= Table.TransformColumns(Source, {{"Begin Time", each Text.BetweenDelimiters(_, " ", ":", 0, 1), type text}})
Regards,
Cherie
Hi Cherie,
That works perfectly. Thank you very much.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
95 | |
76 | |
65 | |
51 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |