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 / I need to roll back da...
Power Apps
Answered

I need to roll back date picker if before 5 AM - Advice please

(0) ShareShare
ReportReport
Posted on by 83

I have a clock control UpdateContext({clockb:Text(Now(),"[$-en-US] hh AM/PM")})

 

So it reads out like so, 08 AM. I need to have date picker roll back one day in the text field if that control says 05 AM. Instead of 3/21/2021 it rolls to 3/20/2021.

 

I was playing with this in the label, If(clockb = "05 PM", adddays(datepicker.selecteddate,-1)) but I think I'm pretty off on my logic here. Can someone help me out please?

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

    hi @PJaeger you have UpdateContext({clockb:Text(Now(),"[$-en-US] hh AM/PM")}) which will add a space before  "05 PM" try " 05 PM" or  UpdateContext({clockb:Text(Now(),"[$-en-US]hh AM/PM")})

     

    hope it helps

     
  • PJaeger Profile Picture
    83 on at

    Ok fixed that, but still hung up on - If(clockb = "05 PM", adddays(datepicker.selecteddate,-1))

  • Verified answer
    rubin_boer Profile Picture
    4,841 Super User 2024 Season 1 on at

    hi @PJaeger  try If(clockb = "10 PM",DatePicker1.SelectedDate-1,DatePicker1.SelectedDate)

     

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard