0

I have a column Date of the following format 06-08-2000.

I need to convert into the following format : dd-mmm-yyyy where mmm would be {Jan, Feb, Mar, ...}

So the output would be 06-Aug-2000.

I am totally new to powerquery and this is my only task using it. Any help would be really appreciated. Thanks in advance.

2
  • Is it clear now ? Commented Aug 7, 2020 at 10:17
  • Olaf provided you with an PowerShell answer in the comment and you tagged the question with PowerShell but your subject states Powerquery. What is it that you want? Commented Aug 7, 2020 at 10:26

3 Answers 3

1

I guess your date column name is "dt". Your input format for the date "06-08-2000" (dd-mm-yyyy your case) is not a recognizable date format in power query. So you have to create a actual date formatted value first from your input date. Then with some couple of more steps you will get your required output

Step-1: Create a new column "new_date" in power query as below-

enter image description here

Step-2: Change the data type of newly created column "new_date" to "Date" type

Step-3: Go back to report by clicking "Close & Apply" button.

Step-4: New create a custom column using following DAX in the report

custom_date = FORMAT(your_table_name[new_date],"dd-mmm-yyyy")

Now you have your required formatted date.

Sign up to request clarification or add additional context in comments.

Comments

0

In Power BI select your column. Then you have a tab "Column tools". Select it and you will see a format option. Enter dd-mmm-yyyy

Comments

0

Assuming your original date is in column date, in Powerquery, add a Add Column ... Custom Column ... with below formula to convert

= Date.ToText([date],"dd-MMM-yyyy")

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.