Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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

 

  • timl Profile Picture
    34,935 Super User 2025 Season 1 on at
    Re: Display the day of the week corresponding to the dates

    For anyone reading this, here is the answer from the other thread that references the same question.

    https://powerusers.microsoft.com/t5/Building-Power-Apps/Show-days-of-the-week/m-p/1686847#M429256

     

    Text(DateValue(Label4.Text); "ddd")
    
    Text(DateValue(Label4.Text); "dddd")

     

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at
    Re: Display the day of the week corresponding to the dates

    Hi @s44 

     

    Now you can add the switch case. 

    Switch(Weekday(DateValue(Label4.Text);Sunday);1;"Sunday";2;"Monday";3;"Tuesday";4;"Wednesday";5;"Thursday";6;"Friday";7;"Saturday")
    
    or 
    
    
    Switch(Weekday(DateValue(Label4.Text),Sunday),1,"Sunday",2,"Monday",3,"Tuesday",4,"Wednesday",5,"Thursday",6,"Friday",7,"Saturday")

     

     

  • s44 Profile Picture
    691 on at
    Re: Display the day of the week corresponding to the dates

    Thanks it's work, but I have numbers instead of days of the week :0 @WiZey 

    s44_0-1658745785227.png

     

  • WiZey Profile Picture
    3,023 Super User 2025 Season 1 on at
    Re: Display the day of the week corresponding to the dates

    Small typo.

     

    It's "Weekday()" with a lower "d".

  • s44 Profile Picture
    691 on at
    Re: Display the day of the week corresponding to the dates

    s44_0-1658739054104.png

    Thank you for your very comprehensive answer. But it still doesn't work 😞 @poweractivate 

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    Re: Display the day of the week corresponding to the dates

    @s44 I already told you before in a few recent responses, don't use ThisItem.Label4.Text

    Instead, use

     

     

     

    Weekday(DateValue(Label4.Text))

     

     

     

    ThisItem is to access the current Record, which has to do with the underlying data.

    Label4 is not a field of a data source, from a previous screenshot you have I think Label4 happens to be a Control that is in the same scope as your Gallery, and I believe also according to that previous screenshot that the formula that you keep trying to put this formula in is another Control that is also in scope of that same Gallery (Ithink it might be Label11) .

     

    Controls that are in same scope as Gallery that are being accessed from another Control in the Gallery, are not accessed through ThisItem.

    Controls are just accessed directly in this case.

     

    Just use

    Label4.Text

     

    ThisItem.Label4.Text will not work,

    but Label4.Text should work.

     

    Check if it helps @s44 

     

    Also, I would encourage you follow the guidance that was provided to you by @RandyHayes in recent responses,

    I am not sure if you did that.

     

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Display the day of the week corresponding to the dates

    @s44 

    Do you want the weekday number or the weekday name?

  • s44 Profile Picture
    691 on at
    Re: Display the day of the week corresponding to the dates

    I have already the same problem :// @poweractivate 

    s44_0-1658504275423.png

     

  • RandyHayes Profile Picture
    76,287 Super User 2024 Season 1 on at
    Re: Display the day of the week corresponding to the dates

    @s44 

    Change the Items property of the gallery to the following:

    ForAll(
     Sequence(If(DateDiff(varVideoFirstDayView; DateAdd(varVideoMonth; 1; Months); Days)>35; 42; 35));
     With({_date: DateAdd(varVideoFirstDayView; Value; Days)};
     {Value: Value;
     Items: Filter(Fournisseur; DateArrivee <= _date && EndTime >= _date);
     _date: _date
     }
    )

     

    To show the name of the day, set your label text to:  Text(ThisItem._date; "dddd")

     

    I hope this is helpful for you.

  • poweractivate Profile Picture
    11,078 Most Valuable Professional on at
    Re: Display the day of the week corresponding to the dates

    @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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,957 Most Valuable Professional

Leaderboard