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 everyone,
I just started working with powerbi desktop, so don't shoot me if I say anything stupid.
Searched the forum for possible matches to my problem, but can't seem to find anything that does. So here it goes:
I have a mySql database that I linked to powerbi. In this database is a column with datatype "datetime". So when I look in the database it shows the datetime like this: "DD/MM/YYYY hh:mm:ss". So I think "Great, this is what I want". But then when I look in the powerbi, it has converted this to "MM/DD/YYYY hh:mm:ss AM/PM" I have no idea why the time setting is different, but it's driving me nuts. I tried to change my regional setting in options, but this didn't seem to help. Neither did changing the query datatype to "using locale".
I don't want to write any code to convert this because it is correct in my database... Can anyone help? Am I doing something wrong? Simple setting I missed? Thank you in advance.
Kind regards,
Wout
Solved! Go to Solution.
It looks like a 24hour isnt available by default, so you can create a calculated column and use the following DAX to achive the time format. The capital "HH" give you the double digit 24hr.
24hr = FORMAT(ReportData[ImportDate],"HH:mm:ss")
https://msdn.microsoft.com/en-us/library/ee634398.aspx
Thanks everyone for the fast response. This works, although I still don't understand why powerBI converts the time in the first place...
Well... it's sorted out, so I'm happy.
Hi Wout,
You can change the date format settings of the OS. You will find the format you want after you restart the Desktop.
Best Regards,
Dale
It looks like a 24hour isnt available by default, so you can create a calculated column and use the following DAX to achive the time format. The capital "HH" give you the double digit 24hr.
24hr = FORMAT(ReportData[ImportDate],"HH:mm:ss")
https://msdn.microsoft.com/en-us/library/ee634398.aspx
You can click on your column in the Fields pane, select Modeling ribbon on top, and go to Format section to find the format you want for your date. If you could not find it, it means that Power BI does not support this format by default, hence you might have to write some DAX to format your date.
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 |
---|---|
115 | |
99 | |
88 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |