Hello,
Could you please advise the M Language formula to convert date format from "dd/mm/yyyy" to "mmm-yy"? I have tried a few formula (for example FORMAT([Request Date],"mmm-yy" and variations of this), but it errors.
Thanks so much.
Hi Danielle,
That's a formatting/display problem that you would do either directly in excel or in DAX, not in Power Query.
Your attached Excel file states that you want a column to show e.g. Jan-21. You can do that without bringing the data into Power Query.
Select the date cells and then press CTRL+1 to show the Format Cells dialog box.
On the Number tab click the Custom category and then scroll down to mmm-yy and select it, or type mmm-yy into the Format area - see attached image.
Regards
Phil
Thanks, Philip.
I assume it would be the same case for postcode formats? That is, for NT, postcodes have a leading zero, which is cut off, when loaded to Power Query. So the only way around this, is to use Custom Format "0000" in Excel. Is that correct?
Hi Danielle,
Correct. Power Query shows you the data as it actually is, without leading zeroes. In Excel or DAX you can apply formatting to affect how that data is displayed.
Regards
Phil
Thank-you, Philip.