How to Remove Time from Date in Power BI
Seeing an unnecessary timestamp like "12:00:00 AM" attached to a date in Power BI can be incredibly frustrating. It clutters your reports, complicates creating relationships, and can even trip up calculations. You don’t need the time, you just want the date. This guide will walk you through several simple and practical methods to remove the time from a date in Power BI, so you can get back to building clean and accurate reports.
Why Remove the Time from a Date in the First Place?
Before we jump into the "how," let's quickly touch on the "why." Stripping the time portion from your dates isn't just about making things look tidy, it's a critical data cleaning step for a few key reasons:
- Accurate Grouping and Aggregation: If you want to see total sales per day, you need to group all transactions from that day together. But if your data has timestamps, '2023-10-25 09:15 AM' is treated as a different value than '2023-10-25 03:30 PM'. By removing the time, you ensure all records from October 25th are properly aggregated under a single date.
- Cleaner Visualizations: Chart axes look much cleaner with just '10/25', '10/26', '10/27' instead of '10/25/2023 12:00:00 AM', '10/26/2023 12:00:00 AM', etc. This improves readability and makes your dashboards more professional.
- Functional Table Relationships: To build accurate data models, Power BI needs a unique common key to link tables. If you try to join a sales table (with timestamps) to a calendar table (without timestamps) based on the date, the relationships won't work correctly because the values won't match exactly.
Method 1: Change the Data Type in Power Query (The Easiest Fix)
For most scenarios, the cleanest and most reliable way to remove time is in the Power Query Editor before the data even loads into your Power BI model. This fixes the problem at the source, ensuring all your calculations and relationships will work correctly from the start.
Follow these quick steps:
- Open Power Query: In the Power BI Desktop
Homeribbon, click onTransform data. This will launch the Power Query Editor window. - Select Your Column: Find the date column that includes the unwanted time information and click on the column header to select it.
- Change the Data Type: With the column selected, go to the
Hometab or theTransformtab in the ribbon. Look for theData Typeoption (it will likely sayDate/Time). Click on it and selectDatefrom the dropdown menu.
Alternatively, you can click the small icon directly to the left of the column header (it usually looks like a calendar with a little clock) and select Date from that menu.
Power Query will then ask you if you want to Replace current step or Add new step. If the column was automatically detected as Date/Time and you simply want to correct it, choosing Replace current step is fine. If you prefer to have a separate, explicit record of this change, choose Add new step.
That’s it! The column will now only contain date values, and the timestamp will be gone for good.
Method 2: Create a New Date-Only Column Using DAX
Sometimes you need to keep the original date/time column for specific analysis (like calculating the time between two events) but also need a separate column with just the date for creating reports and relationships. In this case, you can create a calculated column using DAX in the main Power BI report view.
First, navigate to the Data or Report view in Power BI. Select the table you want to modify, and from the Table tools tab that appears in the ribbon, click New column. Now you can use one of the following simple DAX formulas.
Using the INT() Function
This is a clever and highly efficient way to get the date. Power BI stores dates and times as a serial number, where the integer part represents the date and the decimal portion represents the time.
In the formula bar, type:
Just The Date = INT('YourTable'[YourDateTimeColumn])After you hit Enter, you'll have a new column filled with whole numbers. The final crucial step is to select that new column, go to the Column tools tab, and change the Data type from Whole Number to Date. Power BI will instantly convert those serial numbers into readable dates.
Using the DATE(), YEAR(), MONTH(), and DAY() Functions
This method is more explicit and breaks down the conversion into logical parts. It extracts the year, month, and day from your date/time column and then reconstructs them into a new date value.
In the formula bar, type:
Just The Date =
DATE(
YEAR('YourTable'[YourDateTimeColumn]),
MONTH('YourTable'[YourDateTimeColumn]),
DAY('YourTable'[YourDateTimeColumn])
)This formula creates a clean date column with the proper date data type from the start, making it a reliable choice for your data model.
What About the FORMAT() Function?
You may also see solutions suggesting the FORMAT() function, like this:
Formatted Date = FORMAT('YourTable'[YourDateTimeColumn], "M/dd/yyyy")Be careful with this one. While this function successfully displays the date without the time, it converts the value into a text string, not a real date. Text values don't sort correctly (e.g., "12/1/2023" would come before "2/1/2023") and cannot be used in time intelligence DAX functions like DATESYTD. For analysis, always stick with INT() or DATE() to ensure your output is a proper date value.
Method 3: Adjust Formatting in the Report View (Cosmetic Fix Only)
If you're in a hurry and only need to hide the time in a specific visual or table without altering the underlying data, you can simply change the format.
This is a purely cosmetic fix. The underlying data still contains the time, which can still cause issues with grouping and relationships.
- In the
Reportview, click on your date field in theDatapane on the right. - The
Column toolstab will appear in the top ribbon. - In the
Formatsection, click the dropdown menu and select a short date format, like*3/14/2001 (M/d/yyyy).
The date in your visuals will now appear without the time. Just remember that if you have multiple entries from the same day with different timestamps (like one from 9 AM and another from 5 PM), a visual might still show that day twice because Power BI recognizes them as separate underlying values.
So Which Method Is Best for You?
With a few options available, here’s a quick guide to help you choose the right one:
- Use Power Query (Method 1) for… almost everything. It’s the best practice. It cleans your data at the earliest stage, making your model faster, tidier, and more reliable.
- Use a DAX Column (Method 2) for… scenarios where you must preserve the original
Date/Timecolumn for other calculations but also need a separate, cleanDatecolumn for summaries and relationships. - Use Report View Formatting (Method 3) for… quick adjustments when you need a visual or table to look clean for a presentation, and you're aware of the limitations and have confirmed it won't affect your aggregations.
Final Thoughts
Removing the time from a date field is one of the most common data cleaning tasks you'll encounter in Power BI. By using the Power Query transformations or targeted DAX calculated columns, you can easily prepare your data for accurate analysis, clean visualizations, and a robust data model that everyone on your team can trust.
While mastering these techniques in Power BI is valuable for any analyst, manually cleaning data field-by-field is really just the first hurdle. We built Graphed because we believe getting answers from your data shouldn't require so many manual steps. Instead of needing to open the Power Query editor, create DAX columns, and arrange visuals yourself, we let you just ask questions. You can connect your marketing and sales platforms in a few clicks, then create a real-time dashboard by simply asking, "Show me my sales per day from Shopify for the last 60 days." The AI handles the timestamp conversions, data aggregation, and chart building for you in seconds.
Related Articles
How to Enable Data Analysis in Excel
Enable Excel's hidden data analysis tools with our step-by-step guide. Uncover trends, make forecasts, and turn raw numbers into actionable insights today!
What SEO Tools Work with Google Analytics?
Discover which SEO tools integrate seamlessly with Google Analytics to provide a comprehensive view of your site's performance. Optimize your SEO strategy now!
Looker Studio vs Metabase: Which BI Tool Actually Fits Your Team?
Looker Studio and Metabase both help you turn raw data into dashboards, but they take completely different approaches. This guide breaks down where each tool fits, what they are good at, and which one matches your actual workflow.