cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RubesandBoogs
Frequent Visitor

Help with Date

Hi Powerapp Gurus

 

Need some assistance with date....

I have 2 fields from a sharepoint list;

When did this accident occur?

When was this accident discovered?

 

I am wanting to put a formula where the accident discovered cannot be before the date entered in accident occur.

Thanks in advance

Rae

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @RubesandBoogs ,

Put on the OnChange of Accident Discovered date picker (change to your control names) - this also allows for a blank occur date.

If(
  AccidentDiscoveredControl.SelectedDate < AccidentOccurredControl.SelectedDate ||
  Value(AccidentOccurredControl.SelectedDate)=0,
  Notify(Cannot be before occurrence date, Error);
  Reset(YourAccidentDiscoveredControl)
)

 

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.

View solution in original post

7 REPLIES 7
WarrenBelz
Super User III
Super User III

Hi @RubesandBoogs ,

Put on the OnChange of Accident Discovered date picker (change to your control names) - this also allows for a blank occur date.

If(
  AccidentDiscoveredControl.SelectedDate < AccidentOccurredControl.SelectedDate ||
  Value(AccidentOccurredControl.SelectedDate)=0,
  Notify(Cannot be before occurrence date, Error);
  Reset(YourAccidentDiscoveredControl)
)

 

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.

View solution in original post

eka24
Super User III
Super User III

Assuming you are using AfterDatePicker and BeforeDatePicker, on your submit or Patch button put:

 

If(BeforeDatePicker.SelectedDate>AfterDatePicker.SelectedDate, Notify ("Check the date entered, Before Date, cannot be greater than After Date"), SubmitForm (YourFormName))

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Awesome, thanks @WarrenBelz 

No problem @RubesandBoogs ,

Was my post the solution?

Yes, thank you

@RubesandBoogs ,

That was not the one you accepted - please consider correcting this for the benefit of others viewing in the future.

Sorry @WarrenBelz , first time user of the support function, now corrected

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (55,895)