Skip to main content

Notifications

Community site session details
Power Apps - Building Power Apps
Answered

how to convert date into day of week

Like (0) ShareShare
ReportReport
Posted on 21 May 2020 04:28:20 by

Does anyone know how i can turn date & time into day of week?

I am using Gallery to show my records and I have create date show in one of the fields i.e. 19/5/2020

Can I have another field that shows TUES?

Database: SharePoint

Screen Shot 2020-05-21 at 11.24.55 AM.png

 

 

  • Verified answer
    timl Profile Picture
    34,939 Super User 2025 Season 1 on 21 May 2020 at 09:42:15
    Re: how to convert date into day of week

    Hi @Anonymous 

    You can just add a label and call the Text function to apply a format that displays the day.  This would be easier than calling the Weekday function and writing a Switch statement.

    Text(ThisItem.Created, "ddd")

     

     

    image.png

  • Verified answer
    v-xida-msft Profile Picture
    on 21 May 2020 at 08:18:36
    Re: how to convert date into day of week

    Hi @Anonymous ,

    Do you want to display weekday of the corresponding date time value within your Gallery?

     

    Based on the needs that you mentioned, I agree with @sayyed007amir 's thought almost. The Weekday() function could achieve your needs.

    Please consider add a Label inside your Gallery, set the Text property of this Label to following:

    Switch(
     Weekday(ThisItem.Start),
     1, "SUN",
     2, "MON",
     3, "TUE",
     4, "WED",
     5, "THU",
     6, "FRI",
     7, "SAT"
    )

    Note: The Start represents the Start Date time type column in your SP List, please replace it with actual column name

     

    Weekday function

     

    Please take a try with above solution, check if the issue is solved.

     

    Best regards,

  • sayyed007amir Profile Picture
    357 on 21 May 2020 at 06:35:14
    Re: how to convert date into day of week

    Text Property of Label.
    image.png

    Or where ever you want to show

  • Community Power Platform Member Profile Picture
    on 21 May 2020 at 05:54:07
    Re: how to convert date into day of week

    where do I put this code? Thank you

  • sayyed007amir Profile Picture
    357 on 21 May 2020 at 04:52:40
    Re: how to convert date into day of week

    Using this code you can easily convert:

     

    Switch(Weekday(DateColumnName)
    ,1,"SUN",2,"MON",3,"TUE",4,"WED",5,"THURS",6,"FRI",7,"SAT")


    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

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,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard
Loading started
Loading started
Loading complete