Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

How to calculate date field to show years in another field?

(0) ShareShare
ReportReport
Posted on by 8

Hello,

I have a date field called Hire Date and for example, this field has the date of 1/1/2012.

Then I have another field called, "# of years with current employer"

I need something that would calculate the Hire Date field to today's date and just show the number of years in the "# of years with current employer field"

So for this example it would show 10.

It would then need to be ran daily on all employee records.

How can I do this?

Thank you.

  • Suggested answer
    Community Member Profile Picture
    on at
    RE: How to calculate date field to show years in another field?

    Hi USA80,

    You can achieve it through calculated field, The following are my test steps:

    Step1: Set the Hire Date field to Date and Time type and the # of years with current employer field to Whole Number Type, and add the set two fields to the form.

    Step2: Define calculated columns.

    pastedimage1647230244576v1.png

    pastedimage1647230263397v2.png

    Step3: The test results show that it can be achieved.

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,280 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,046 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans