Skip to main content




How to format dates in Power BI with an example? With these format date options, you can extract Year, Month, Day, Day Number, Day Name, Start and End of Month, etc.

 

How to format dates in Power BI

To demonstrate these Power BI date formats, we'll use the SQL table that we imported in the Enter data article.

To format dates in any table, click the Edit queries option under the Home tongue.

how-to-format-dates-in-power-bi-1-3500132<>how-to-format-dates-in-power-bi-1-3500132

By clicking on the Edit queries The option opens a new window called Editor de Power Query.

In the screenshot below, you can see the HireDate column. To demonstrate Power BI date format options, we'll use this column.

 

how-to-format-dates-in-power-bi-2-7782546

There are a couple of ways to format dates in power bi

The first approach to formatting dates in Power BI

Select the date column and right click on it to open the context menu. Select the Transform option and select the format option. For now, we are selecting the year. It means that this property pulls and displays the years from the hire date.

how-to-format-dates-in-power-bi-3-4865562

In the screenshot below, you can see the date and time in the Hire Date column replaced by the extracted year.

how-to-format-dates-in-power-bi-4-4270511

The second approach to formatting dates in Power BI

First, go to Transform Tongue. In this tab, you can see the Date and Time options. You can use these dropdown lists to format dates.

how-to-format-dates-in-power-bi-5-5515090

Clicking the down arrow next to the date displays the dropdown list of available date formats. For the purpose of the demo, we are selecting Days of the month.

how-to-format-dates-in-power-bi-6-7789612

In the following screenshot, you can see the date and time in the Hire Date column replaced by the total number of days in a month.

how-to-format-dates-in-power-bi-7-2548069

The third approach to formatting dates in Power BI

The approaches specified above are replacing the existing column with the formatted date. But this approach add a column extra for formatted date.

First, go to Add column Tongue. In this tab, you can see the options for Date, Time, and Duration. You can use these dropdown lists to format the date and time.

how-to-format-dates-in-power-bi-8-6671680

Let me select the Date Only option in Power BI.

how-to-format-dates-in-power-bi-9-2779271

Now you can see the new column (additional column) showing the date of the hire date

how-to-format-dates-in-power-bi-10-3464871

Let me select only the time

how-to-format-dates-in-power-bi-11-3016411

Now you can see the new column showing the time since the hire date

how-to-format-dates-in-power-bi-12-8111274

Let me select the name of the day

how-to-format-dates-in-power-bi-13-2448340

Now you can see the additional column showing the name of the day. Then press the Close and apply option under the Home tab to apply these changes.

how-to-format-dates-in-power-bi-14-3579034

Please wait until the changes are applied

how-to-format-dates-in-power-bi-15-8819848

You can now see the Date, Day Name, and Time columns in the SQL Employee table.

how-to-format-dates-in-power-bi-16-4164986