How to get month name, Week day name in Power Apps canvas apps

Hello everyone and welcome to my blog. In today’s blog I will discuss on how to get the month name and week day name in canvas app

Through my blog I share interesting tips and discuss on latest releases of Microsoft.NET technologies, Dynamics 365 and Power Platform, SharePoint and Client scripting libraries. Please subscribe to my blog to stay updated.

Let’s take an example. As of the day of writing this blog, today’s date is 10-Aug-2023. My requirement is to display this date as – Thursday, 10 August, 2023. Basically the requirement is to display the weekday name and full month name.

Power Apps have Month and WeekDay function. However both these functions does not return the output we are expecting. The Month function return the month number for the input date.

Same is the case with WeekDay function. It returns a number to represent day of week.

I come across implementations where we tend to end up with using switch-case construct to get the month name and weekday name depending based on the output of these functions.

However this be easily achieved using the Text function. Quite unknown to many, Text function can return the output of a date in any format desired. Let’s take our example.

To return the month name from a date, we need to use the following expression

If you want short month name, you can use the following expression

For weekday name, use the below construct.

Wondering how to show AM/PM for your date fields. Please check this blog to find out.

Hope this helped. For similar interesting topics on Microsoft.NET and Power platform, please subscribe to my blog.

Debajit Dutta
Business Solutions MVP


Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe to get the latest posts sent to your email.

Discover more from Debajit's Power Apps & Dynamics 365 Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading