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 / Default Date - Change ...
Power Apps
Answered

Default Date - Change to tomorrow if past certain time

(0) ShareShare
ReportReport
Posted on by 51

I am have a date picker that defaults to today. However, I want the date picker to:

 

If the time is before 10:30am, default to today

If the time is after 10:30am, default to tomorrow

If the day is Friday, and the time is after 10:30am, default to Monday

 

I'm not sure how to put all this together. Any help is really appreciated 🙂

Categories:
I have the same question (0)
  • Verified answer
    PowerThomas Profile Picture
    277 on at

    @MrLetts 

     

     

    With(
     {
     varCurrentTime: Time(Hour(Now()),Minute(Now()),Second(Now()))
     },
     If(
     varCurrentTime > Time(0,0,0) And varCurrentTime < Time(10,30,0),
     Today(),
     If(
     Weekday(Now()) = StartOfWeek.Friday,
     DateAdd(Today(),3),
     DateAdd(Today(),1)
     )
     )
    )

     

     

     

    But what if the day is Saturday or Sunday? 😁

    ━━━━━━━━━━━━━━━━━━━━━━━━━
    If I have answered your question, please mark your post as Solved✔️
    Solved questions helps users in the future who may have the same issue or question quickly find a resolution via search.
    If you liked my response, please consider giving it a Thumbs Up👍 Thank you!

  • WarrenBelz Profile Picture
    153,084 Most Valuable Professional on at

    HI @MrLetts ,

    This should do it

    If(
     Hour(Now()) > 10 || (Hour(Now()) = 10 && Minute(Now()) > 30),
     Today() + 
     If(
     Weekday(Today()) = 6,
     3,
     1
     ),
     Today()
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard