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
PoojaG
Helper II
Helper II

Convert DateTime format from dd/mm/yyyy hh:mm:ss to dd/mm/yyyy hh

Please let me know how to convert a DateTime format from dd/mm/yyyy hh:mm:ss to dd/mm/yyyy hh in Power editor.

For example 01/01/2019 02:12:34 to 01/01/2019 02:00:00.

1 ACCEPTED SOLUTION
Riantilo
Frequent Visitor

Edit: [start_time] is a DateTime column

Its not in the default transform options. I did accomplish this once using Power Query. It isn't pretty but it works.

I created a Custom Column with the following formula:
Text.From(Date.Day([start_time]))
&"/"&
Text.From(Date.Month([start_time]))
&"/"&
Text.From(Date.Year([start_time]))
&" "&
Text.From(Time.Hour(DateTime.Time([start_time])))
&":00:00"

After that select data type of the column and set it to Date/Time.

Gr,

Jesse

View solution in original post

2 REPLIES 2
Riantilo
Frequent Visitor

Edit: [start_time] is a DateTime column

Its not in the default transform options. I did accomplish this once using Power Query. It isn't pretty but it works.

I created a Custom Column with the following formula:
Text.From(Date.Day([start_time]))
&"/"&
Text.From(Date.Month([start_time]))
&"/"&
Text.From(Date.Year([start_time]))
&" "&
Text.From(Time.Hour(DateTime.Time([start_time])))
&":00:00"

After that select data type of the column and set it to Date/Time.

Gr,

Jesse

Anonymous
Not applicable

I don't believe that is a default option but this can be solved in DAX

 

=FORMAT(<value>, "dd/mm/yyyy hh")

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.