Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans