Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum
Suggested answer

Convert decimal to whole in calculated field

Posted on by
Hello,
 
I created a calculated field of type date time.
the role of the field is to add years (from a field called seniority) to a field called joining date.
but the seniority field is of type decimal. The AddYears() function in the calculated field takes only a whole number.
Is there a way to convert a seniority to whole number before using it in the function ADDYEARS()?
 
  • Suggested answer
    Leah Ju Profile Picture
    Leah Ju Microsoft Employee on at
    Convert decimal to whole in calculated field
    Hi Partner,
     
    Yes, ADDDAYS () function must take whole number.
    You need convert decimal to whole type, but it can't be achieved in calculated field directly.
     
    You should create another whole number field to get integer from original decimal field, then you need use new created whole number field in the calculated field.
    --Using power automate to convert them:

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

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

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,532 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,501 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans