cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sharuk
Helper IV
Helper IV

end date greater than 7 days

Hi

 

i'm trying to validate the end date that should be defaulted to greater than 7days from the start date, if end user is selecting before 7 days it should show some error, is there a possibility to do this ?

2 ACCEPTED SOLUTIONS

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @Sharuk ,

You need the DateDiff() Function. So

If(
   DateDiff(
      StartDate,
      EndDate,
      Days
   )>7,
   Notify(
      "Period cannot be more than 7 days", 
      NotificationType.Error
   )
)

 

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

RyanVH
Advocate II
Advocate II

Hi,


I'm not sure but maybe you could use this DateDiff(startDate, endDate, Days)

If( DateDiff(startDate, endDate, Days) < 7, Notify(...)

I'm not sure if this is what you're looking for.

Kind regards
Ryan

View solution in original post

5 REPLIES 5
WarrenBelz
Super User III
Super User III

Hi @Sharuk ,

You need the DateDiff() Function. So

If(
   DateDiff(
      StartDate,
      EndDate,
      Days
   )>7,
   Notify(
      "Period cannot be more than 7 days", 
      NotificationType.Error
   )
)

 

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

RyanVH
Advocate II
Advocate II

Hi,


I'm not sure but maybe you could use this DateDiff(startDate, endDate, Days)

If( DateDiff(startDate, endDate, Days) < 7, Notify(...)

I'm not sure if this is what you're looking for.

Kind regards
Ryan

View solution in original post

Hi @WarrenBelz , in my case i'm looking for end date to be greater than 7days. so that would be <7 days ? correct me if i'm wrong

@Sharuk ,

Actually <8 days or <= 7 days

 

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.

Hi @Sharuk ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,985)