How to display Week day names in a Dropdown in Power Apps based on user locale

Hello everyone and welcome to my blog. In today’s blog I will show a simple technique on how you can display Weekday names in Dropdown inside canvas apps.

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 get started. Suppose you have a requirement to show the weekdays in a DropDown control. Whenever I come across similar requirement, in majority of the cases I find makers hardcoding the Items property similar to below.

Well, there is nothing wrong with this. This will work too. However the problem arises when you need to show the values depending on the locale of the user.

On a different note, if Locale is not an issue and you always want to display the values in English, you should always try to do it in a cleaner way if possible.

Power Apps have Calendar() function which allow you to do just that. You can find more about Calendar function here.

Coming back to the requirement, I will change the above Items formula to below.

And there you go.

Remember I told you, the values will change based on Locale.

Below are the result when the same function is used for German (Deutsch) locale.

I hope this helped. If you have liked the post and if this post has helped you, please subscribe to my blog.

Debajit Dutta