zofia
zofia

Reputation: 91

Power Query convert from Date to MMM-YY and QYY format

I was wondering if you could help me to convert the data format per below: 01/01/2018 to Jan 18 09/30/2018 to Q3 18

=Table.AddColumn(#"Removed Columns2", "Custom", each Date.ToText([Report Date],"MMM")&"-"&Date.Year([Report Date],"YY"))

This is what I have tried so far and no results:

Thank you very much for your help!

Upvotes: 1

Views: 14729

Answers (1)

Olly
Olly

Reputation: 7891

You're nearly there.

Try

Custom1 = Table.AddColumn(#"Removed Columns2", "MMM-YY", each Date.ToText([Report Date],"MMM-yy")),
Custom2 = Table.AddColumn(#"Custom1", "QYY", each Number.ToText(Date.QuarterOfYear([Report Date])) & Date.ToText([Report Date], "yy"))

Upvotes: 3

Related Questions