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

Show days, months and year in one field

(0) ShareShare
ReportReport
Posted on by

Hi all,

I would like to know that is it possible to show the calculated Day, Month, Year  in one field on the form.

I mean that is the difference between two dates is in days then it should show no. of days. 

If the difference between two dates is in months the it should show no. of months and so on.

I have no idea how can I bring a best solution for this. Please let me know if there is solution.

Thank you.

I have the same question (0)
  • Suggested answer
    a33ik Profile Picture
    84,331 Most Valuable Professional on at

    Hello,

    If you want to have something like that I would recommend creating a PCF control for that purpose.

  • Suggested answer
    Community Member Profile Picture
    on at

    Hi Sravz,

    You can achieve it through calculated fields and business rule.

    Steps:

    1.Create custom fields and add them to the form:

    (1)Three calculate fields to store difference in years/months/days.

    pastedimage1645511739246v5.png

    pastedimage1645510905188v3.png

    pastedimage1645511910504v6.png

    (2) Uncheck 'Visible by default' option for these three fields in the form.

    pastedimage1645513096572v8.png

    2.Create a business rule to populate 'Result' field automatically.

    pastedimage1645513017621v7.png

    IF

    Years greater than 0

    THEN
    Show field Years
    Hide field Months
    Show field Days
    ELSE IF

    Months greater than 0

    THEN
    Show field Months
    Hide field Years
    Hide field Days
    ELSE
    Show field Days
    Hide field Years
    Hide field Months

    3.Test Result:

    pastedimage1645513371260v9.png

    Change date and save current record:

    pastedimage1645513395306v10.png

  • Community Member Profile Picture
    on at

    Hi Leah,

    Thank you so much for the response.

    I am trying to do replicate exactly as you explained. But, my requirement is I need to see all Year,Month,Day in one field.

    Can I concat the fields to show in one field.

    for example :   I have one day it shows only 1day

                      If its 1month and 2days it should also show that.

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 March Top 10 Community Leaders

These are the community rock stars!

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

#1
11manish Profile Picture

11manish 174

#2
ManoVerse Profile Picture

ManoVerse 58 Super User 2026 Season 1

#3
Niki Patel Profile Picture

Niki Patel 42

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans