Notifications
Announcements
Hello,I have a gallery that shows me several days of the week like in the screenshot below. However, I would like to indicate to the left of the dates, the corresponding day of the week. But I can't do that 😞Could you help me please? Thanks in advance !
Hi,You can use Weekday(ThisItem.DateFieldVal) to get weekday. You can then use this weekday in a switch statement Switch(Weekday(ThisItem.DateLabel),1,"Sunday",2,"Monday,3,"Tuesday",4,"Wednesday",5,"Thursday",6,"Friday",7,"Saturday")
@s44
Check here for info
Date part functions - docs.microsoft.com
Weekday( DateTime [, WeekdayFirst ] )
The Weekday function returns the weekday of a Date/Time value. By default, the result ranges from 1 (Sunday) to 7 (Saturday). You can specify a different range with an Microsoft Excel Weekday function code or a StartOfWeek enumeration value:
See working with dates and times for more information.
It's doesn't work :c @NandiniBhagya20
This doesn't work for me in my Power Apps 😕
Try using "DateValue()" to convert a text into a datetime.
Also you missed a « " » next to "Monday".
Thanks but it's already doesn't work :'( @WiZey
Try also what @WiZey said and use DateValue around ThisItem.Label4
Weekday(DateValue(ThisItem.Label4.Text))
DateValue PowerApps - docs.microsoft.com for more info
Check if it helps @s44
This still doesn't work. I don't understand at all, and neither does the documentation help solve my problem I'm sorry >< @poweractivate
Use:
Label4 is of type Control. You must use Label4.Text to access the Text property.
Check if it helps
Another problem, ThisItem is to access the Record of that corresponding data source row for the Gallery, this is for accessing the Data Source fields that are corresponding to that gallery row, not for accessing the other Controls on that Gallery row. The Control is already in-scope of the Gallery, and is not supposed to be accessed by ThisItem, but simply accessed directly instead.
You should not use ThisItem here.
Just access Label4.Text directly instead.
Try
Weekday(DateValue(Label4.Text))
See if it helps @s44
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268