In Dataverse, you may need to display a Date and Time
column in a readable "Month Year" format — like May 2025
. This is especially useful for calculated or formula-type columns where formatting options are limited.
Here's how to do it using Power Fx in a Formula column:
✅ Step-by-Step Formula
Switch(
Month([@InvoiceDate]),
1, "January",
2, "February",
3, "March",
4, "April",
5, "May",
6, "June",
7, "July",
8, "August",
9, "September",
10, "October",
11, "November",
12, "December"
) & " " & Text(Year([@InvoiceDate]), "0")
🔁 Replace
[@InvoiceDate]
with the actual internal name of your date field.🔍 Why This Works
Month()
extracts the month as a number (1–12).Switch()
maps the month number to the month name.Year()
extracts the year.Text(..., "0")
safely converts the numeric year to a text string (without commas or decimals — required by formula columns).
Test Result:
No comments:
Post a Comment