web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Display the day of the...
Power Apps
Unanswered

Display the day of the week corresponding to the dates

(0) ShareShare
ReportReport
Posted on by 691

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 !

 

s44_0-1658495213744.png

 

s44_0-1658497688895.png

 

Categories:
I have the same question (0)
  • NandiniBhagya20 Profile Picture
    4,667 Super User 2024 Season 1 on at

    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")

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @s44 

     

     Check here for info

     

    Date part functions - docs.microsoft.com

     

    Weekday( DateTime [, WeekdayFirst ] )

    • DateTime - Required. Date/Time value to operate on.
    • WeekdayFirst - Optional. Excel code specifying which day starts the week. If not supplied, 1 (Sunday first) is used.
       

    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:

    Excel code StartOfWeek enumeration Description
    1, 17 StartOfWeek.Sunday Numbers 1 (Sunday) through 7 (Saturday). Default.
    2, 11 StartOfWeek.Monday Numbers 1 (Monday) through 7 (Sunday).
    3 StartOfWeek.MondayZero Numbers 0 (Monday) through 6 (Sunday).
    12 StartOfWeek.Tuesday Numbers 1 (Tuesday) through 7 (Monday).
    13 StartOfWeek.Wednesday Numbers 1 (Wednesday) through 7 (Tuesday).
    14 StartOfWeek.Thursday Numbers 1 (Thursday) through 7 (Wednesday).
    15 StartOfWeek.Friday Numbers 1 (Friday) through 7 (Thursday).
    16 StartOfWeek.Saturday Numbers 1 (Saturday) through 7 (Friday).

     

    See working with dates and times for more information.

  • Hii_iii Profile Picture
    691 on at

    It's doesn't work :c  @NandiniBhagya20 

    s44_0-1658497420824.png

     

  • Hii_iii Profile Picture
    691 on at

    This doesn't work for me in my Power Apps 😕

  • WiZey Profile Picture
    3,023 Moderator on at

    Try using "DateValue()" to convert a text into a datetime.

     

    Also you missed a « " » next to "Monday".

  • Hii_iii Profile Picture
    691 on at

    Thanks but it's already doesn't work :'(  @WiZey 

     

    s44_0-1658497812417.png

     

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @s44 

     

    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 

  • Hii_iii Profile Picture
    691 on at

    s44_0-1658498125914.png

    This still doesn't work. I don't understand at all, and neither does the documentation help solve my problem I'm sorry ><  @poweractivate 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @s44 

    Use:

     

    Weekday(DateValue(ThisItem.Label4.Text))


    Label4 is of type Control. You must use Label4.Text to access the Text property.

     

    Check if it helps

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at

    @s44 

     

    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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard