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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Convert decimal to whole in calculated field

(0) ShareShare
ReportReport
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()?
 
I have the same question (0)
  • Suggested answer
    Leah Ju Profile Picture
    Microsoft Employee on at
    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
11manish Profile Picture

11manish 135

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 82 Super User 2026 Season 1

#3
CP04-islander Profile Picture

CP04-islander 57

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans