web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Expiration date create...
Power Apps
Unanswered

Expiration date creates a due date that falls into a group of due dates beginning of the year or middle of the year.

(0) ShareShare
ReportReport
Posted on by 141

This may be a little confusing as it has been for me so please bare with me. I have an expiration date and want it to automatically create a due date that falls into either the 12/30 end of year group or 6/30 middle of the year group.

 

As an example:

I have a record with a expiration date of "01/01/2023".  I want it to fall into the group of 06/30/2022 as 12/30/2022 would be to close of a due date. Id like at least a few month gap in-between dates so it gives us preparation time.

 

I'm using a date picker for the due date and a date picker for the expiration. When I pick the expiration date I'd like it to auto fill the due by date.

 

Here is the code I'm currently playing with. Not the best written as I'm sure there is something better out there.

This code would'nt work due to the year change and not giving me a few months gap. Pretty embarrassing, lol. Hard to wrap my head around this.

 

If(Value(DateValue(ThisItem.CertExpiration),"[$-en-US] mm/dd/yyyy") < Value(DateValue("06/29"),"[$-en-US] mm/dd") , Text(DateValue("6/30/" & Text(DateValue(ThisItem.CertExpiration),"[$-en-US] yyyy") ),"[$-en-US] mm/dd/yyyy"),Text(DateValue("12/30/" & Text(DateValue(ThisItem.CertExpiration),"[$-en-US] yyyy") ),"[$-en-US] mm/dd/yyyy"))

 

Categories:
I have the same question (0)
  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    how about using the DateDiff function?

  • Leu0101 Profile Picture
    141 on at

    @LuizVicente Could you possibly give me an example. I took another shot at it yesterday with no luck. I'm gonna take another shot at it today.

  • LuizVicente Profile Picture
    984 Super User 2024 Season 1 on at

    Here's an example of how you can determine the number of months between dates (don't worry about Button or Set.. etc):

     

    Roverandom_0-1662052935369.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 342 Most Valuable Professional

#2
11manish Profile Picture

11manish 234

#3
Valantis Profile Picture

Valantis 187

Last 30 days Overall leaderboard