Forum Discussion
Date formatting
Need help in formatting the date column in the below format
Hi Sow-1 ,
Make sure your data type is set for Date, and in format field past the the follow string: ddd, dd MMM, yyyy
Your final result will look like this:
5 Replies
- Bibiano_GeraldoSuper User
Hi Sow-1 ,
Make sure your data type is set for Date, and in format field past the the follow string: ddd, dd MMM, yyyy
Your final result will look like this:
- LaxmanjatothResolver I
great man
- 123abcCommunity Champion
It looks like you’re using DAX in Power BI to format your date column. The FORMAT function indeed converts the date into text. If you need to keep the date as a date type while displaying it in the desired format, you might need to handle the formatting at the visualization level rather than in the data model.
However, if converting to text is acceptable for your use case, you can use the FORMAT function as you did. Here’s the correct syntax:
FormattedDate = FORMAT(table[Date], "ddd, dd MMM, yyyy")
If you need to keep the date type, you can use the following approach in Power BI:
- Create a calculated column with the formatted date as text.
- Use this column in your visuals where you need the specific format.
If you need further assistance with Power BI or any other tool, feel free to ask!
- Kedar_PandeSuper User
In Power BI, the FORMAT function converts a value into a text string. Since you need to keep the column as a "Date" data type, FORMAT alone won't suffice. Unfortunately, Power BI does not allow for custom date formats directly while retaining the data type as Date.
Go to the Power Query Editor.
Duplicate the Date column.
Format the new column using Power Query's built-in options (under "Transform" → "Format").
Use the original Date column for calculations, and the formatted text column for display.💌 If this helped, a Kudos 👍 or Solution mark ✅ would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn