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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Select first day of we...
Power Apps
Answered

Select first day of week and translate to table

(0) ShareShare
ReportReport
Posted on by 52

 

 

Hi, I have a app for hour registration, someone else built this one. 

 

You should select the first day of the week, I selected the 30 of oktober (30/10/2023)  and  than it shows 29 of october till the 4 th of november

 

but it should start on the 30th ( the field below the 29 is called monday.

 

the formula is: Today()-(Weekday(Today(); StartOfWeek.MondayZero))+1

 

But that doens't doesn't do the trick.

 

ChatGTP told me to use : Today() - Weekday(Today(), FirstDay.Monday) + 1

 

 

But this doens't work as well since it doensn't reconize "FirstDay.Monday"

 

Any tips?

 

YasmineH_1-1698667464963.png

 

 

Categories:
I have the same question (0)
  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @YasmineH 

     

    Try this:

     

    Today() - Weekday(Today(), 2) + 1

     

    My code: 

    DatePicker1.SelectedDate - Weekday(DatePicker1.SelectedDate, 2) + 1

     

    SpongYe_0-1698668207488.png

     

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

  • YasmineH Profile Picture
    52 on at

    Thanks a lot @SpongYe , I tried your solution an still got this: 

    YasmineH_0-1698668853449.png

     

  • SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @YasmineH 

     

    The DefaultDate is the initial value of a date control unless the user changes it.

    I would suggest to store 'Dag van de week' in a variable and then use the variable to calcualte the weekdays. 

     

    Leave the DefaultDate as:

    Today()

     

    Datepicker.OnChange:

    UpdateContext({
     varBeginVanDeweek: 
     DatePicker1.SelectedDate - Weekday(DatePicker1.SelectedDate, 2) + 1
    })

     

    On the Label.Text: 

    Text(varBeginVanDeweek, "dd")

     

    You can create a extra label below the Datepicker:

    "Begin van de week: " & varBeginVanDeweek

    And hide it when varBeginVanDeweek isBlank():

    If(!IsBlank(varBeginVanDeweek), true, false)

     

    Check my use case:

    SpongYe_0-1698671869956.png

    If you have any questions or feedback, please let me know. Have a great day! 😊


    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

  • Verified answer
    YasmineH Profile Picture
    52 on at

    @SpongYe Thanks a lot, just a minor issue... it hops a week back? 

    YasmineH_0-1698675613901.png

     

  • Verified answer
    SpongYe Profile Picture
    5,909 Super User 2026 Season 2 on at

    Hi @YasmineH 

     

    I get the same value if I change my DateTimeZone from

    DateTimeZone.UTC

    to:

    DateTimeZone.Local

    If you have any questions or feedback, please let me know. Have a great day! 😊

    -----------------------
    PowerYsa Power Platform Enthusiast [LinkedIn] | [Youtube]

    I love to share my knowledge and learn from others. If you find my posts helpful, please give them a thumbs up 👍 or mark them as a solution ✔️. You can also check out my [@PowerYSA] for some cool solutions and insights. Feel free to connect with me on any of the platforms above. Cheers! 🍻

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard