cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PoojaG Frequent Visitor
Frequent Visitor

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

Accepted Solutions
Riantilo Frequent Visitor
Frequent Visitor

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

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
doobie Regular Visitor
Regular Visitor

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

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

 

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

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

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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors