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 / Need to copy "Hire Dat...
Power Apps
Answered

Need to copy "Hire Date" to new column, only with the current year, as "Anniversary"

(0) ShareShare
ReportReport
Posted on by 282
I'm building a Power App to display work anniversaries that occur this week.
 
I have a list with fields and data like this...
Name: Jon Doe
Hire Date: April 2, 1970
Location: St Louis
 
My app needs to show...
Jon Doe            Apr 2
St Louis            53 Years
 
To get "Apr 2" I successfully used AddColumns to add "ShortHireDate" using...   Text(DateValue(mm/dd/yyyy), "mmm dd")
I got the years successfully using AddColumns to add "Years" using...  DateDiff(field_3, Today(), TimeUnit.Years)
 
Problem: I need to filter my list to show only items where the month/day matches a month/day combo for this week?
 
My idea is to use AddColumns to add a column called "Anniversary", which stores the month and day from "Hire Date" but with the current year.
Example:
Hire Date: 04/02/1970
Anniversary: 04/02/2023
Then I can filter the gallery view using...
Filter(
colAnniversaries,
Anniversary >= Today() - Weekday(Today()) + 1 && Anniversary <= Today() + (7 - Weekday(Today()))
 
How would I go about populating the "Anniversary" field using the month and day from "Hire Date" but the current year?
Categories:
I have the same question (0)
  • Verified answer
    WarrenBelz Profile Picture
    155,344 Most Valuable Professional on at

    Hi @rkirk2k ,

    The WeekNum function will assist you here

    Filter(
     AddColumns(
     YourDataSource,
     "WeekNo",
     WeekNum(
     Date(
     Year(Today()),
     Month(field_3),
     Day(field_3)
     )
     ),
     "Anniverary",
     Text(field_3, "mmm d")
     "Years",
     DateDiff(
     field_3, 
     Today(), 
     TimeUnit.Years
     )
     ),
     WeekNum(Today()) = WeekNo
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 883

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 477

Last 30 days Overall leaderboard