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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Date formatting issues MM/DD/YYYY --> DD/MM/YYYY

I have a temperature sensor connected to Power BI Service through an API data stream. The sensor writes an eventID, a temperature value and a timestamp by using Microsoft Flow. 

 

I have issues with the date formatting. I want Power BI to read it as DD/MM/YYYY HH:mm (24 hour clock), but it reads it as MM/DD/YYYY hh:mm (12 hour clock). 

 

I run the following command in MS Flow to format the time: 

convertTimeZone(triggerBody()?['event']?['timestamp'], 'UTC', 'W. Europe Standard Time', 'dd/MM/yyyy HH:mm') 

 

I think this works properly. 

 

I have tried to set the language in Power BI Service to Norwegian (which uses DD/MM/YYY format) and English (UK) but it does not work. I have also tried to set the browser language to Norwegian or English (UK) and set Power BI language to browser default. This does not work either. 

 

As the data is gathered with APIs in Power BI Service, I cannot create a column with DAX converting the date to DD/MM/YYYY. 

 

Any suggestions are welcome!

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Why not just adjust your Flow?

 

convertTimeZone(triggerBody()?['event']?['timestamp'], 'UTC', 'W. Europe Standard Time', 'MM/dd/yyyy HH:mm') 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

10 REPLIES 10
Rajiv
Advocate I
Advocate I

I was having a lot of issues while using DD/MM/YYYY and dd/mm/yyyy along with time stamp. The dates never came correctly. Took a while to figure out the mm and MM makes a lot of difference. For dates we need dd/MM/yyyy (M in capital). mm refers to minutes. So when I was using dd/mm/yyyy, I was getting values like 15/56/2020. The capital Ms fixed it.

chthomama
Frequent Visitor

Hi there

 

i'm facing a similar issue. Have you found a solution or workaround?

 

Thanks for your help

Anonymous
Not applicable

Hi,

 

I forgot to accept the solution proposed here, sorry about that 🙂

Hi andrmi,

thanks for your quick reply.

 

I managed to get the right date format with following statement:

 

convertTimeZone(body('Antwortdetails_abrufen')?['submitDate'], 'UTC', 'W. Europe Standard Time', 'dd/MM/yyyy HH:mm')
 
but i still have the problem with the time! I get 12 hours digits instead of the 24 digits? Any idea?
Anonymous
Not applicable

Hi,

 

You may have to change the language settings i Power BI Service to get 24 hour clock format. Log into Power BI Service, click the settings button, then settings and language. Select your language (which I assume uses 24 hour format). 

 

If this does not work, try the following: https://community.powerbi.com/t5/Service/changing-timezone-of-powerbi-service/td-p/153663 

The language settings are just fine. Then the other proposed solution is also not working, because i've a streaming data set and i am not able to add own columns with the query editor.

 

 

 

 

Anonymous
Not applicable

Then I am out of ideas, sorry!

Thanks ayway! 🙂

 

Now i actually found the problem, but for me this seems more like a bug. Following situation:

 

When i change the X graph of the visuals to continuos the 24 format of the time applies. If i change it back to "categorical" its again the 12 hour format.

 

Isn't that a strange behavior?

Anonymous
Not applicable

Sounds strange. I suggest you post it as a bug in issues forum: https://community.powerbi.com/t5/Issues/idb-p/Issues 

Greg_Deckler
Super User
Super User

Why not just adjust your Flow?

 

convertTimeZone(triggerBody()?['event']?['timestamp'], 'UTC', 'W. Europe Standard Time', 'MM/dd/yyyy HH:mm') 


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.

Top Solution Authors
Top Kudoed Authors