Forum Discussion
Reformat datetime to only date
Hi everyone
I have a table coming from sql server that is a datetime. In PowerBI I only want date not time. How do I fix this? The data is being displayed in a PowerBI table:
Thank you
9 Replies
- rajendraongole1Super User
Hi mj2024 - Go to Data View in Power BI.
Select the table containing your datetime column.
Click on the column with datetime values (e.g., YourColumnName).
In the Column Tools tab, locate the Format dropdown.
Choose the Date format (e.g., dd/mm/yyyy or yyyy-mm-dd).
This will display only the date part while keeping the underlying datetime data.
or option 2:
If you prefer to fix this at the query level:
-
Go to Home > Transform Data to open Power Query Editor.
-
Select the column with the datetime values.
-
Go to the Transform tab.
-
Click on Date > Date Only.
-
Close and Apply changes to Power BI.
This will transform the column to a date-only format in the Power Query Editor.
-
- v-achippaCommunity Support
Hi mj2024,
Thank you for reaching out to Microsoft Fabric Community.
Below is the simple approach to change from date and time to only date in Power BI
- Open the Report page and from the Home ribbon select Transform data
- A new Power Query Editor window will open
- Now for the required column, beside column name there is data type, click on the data type and from there select the Date data type. It will display only the date but not the time.
Before:
After:
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank and Regards,
Anjan Kumar Chippa
- v-achippaCommunity Support
Hi mj2024,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution I have provided for the issue worked? or let us know if you need any further assistance?
If my response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Thank you for being a part of the Microsoft Fabric Community Forum!
Thanks and Regards,
Anjan Kumar Chippa
- v-achippaCommunity Support
Hi mj2024,
We wanted to kindly follow up to check if the solution I have provided for the issue worked? If the issue is resolved, please mark the solution as Accept as solution to help the other members of the community find it more quickly. or let us know if you need any further assistance?
Don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you for being a part of the Microsoft Fabric Community Forum!
Thanks and Regards,
Anjan Kumar Chippa
- Bibiano_GeraldoSuper User
- skparavind_1994Frequent Visitor
In your table view, select the desired column and change the data type to date:
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
- skparavind_1994Frequent Visitor
You can also try another option using the sql query
SELECT CAST('Datetime column' AS Date) AS ConvertedDate from Tablename
- skparavind_1994Frequent Visitor
mj2024 Have you tried this solution.
If you found this answer helpful:
Mark it as the solution to help others find it faster.
- mj2024Helper II
Thank you everyone.
I am getting an error when I try to change the type:
I do not want to import the data because that is going to make my PowerBI file too big. I prefer the query approach.
I changed the source sql query to say yet PowerBI keeps on adding the time:
CAST(EARNINGS_DATE AS date) AS EARNINGS_DATEAny ideas on how to fix this?
Thank you