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 / How to set expiration ...
Power Apps
Answered

How to set expiration date based on value selected on Dropdown

(0) ShareShare
ReportReport
Posted on by 13

Hi All

 

Can anyone please help me figure this out. I need to set expiration date in PowerApps based on training selected on Dropdown and date completed.

for example if user completes Training A on 5/4/2021 then expiration date should be a year later and if Training B was completed on 5/5/2021 then expiration date should be a 2 years later

 

This is the formula that I am using in SharePoint list.

=IF(Training="Training A",[Date Completed]+365,IF(Training="Training B",[Date Completed]+730,IF(Training="Training B","12/31/2999")))

 

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    DateAdd(Today(),365,Days) will give you the date 1 year from today. Can change today to a variable that is in date format, and 365 & days both to any number and unit.

  • Verified answer
    eka24 Profile Picture
    20,923 on at

    Does it mean you are dealing with only 2 dates? if on the DefaultDate of the DatePicker which holds the formula:

    If(DatePicker1.SelectedDate>Today() And Dropdown1.Selected.Value = "Training A",DateAdd(DatePicker1.SelectedDate,365),
    If(DatePicker1.SelectedDate<Today() And Dropdown1.Selected.Value = "Training B",DateAdd(DatePicker1.SelectedDate,730),Today()))
    ------------

    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.
    ------------

    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.

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