Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Calculate Years Trading From Date Started Trading

Posted on by 1,779

As subject...

I'm using a calculated field to populate Years Trading based on the date entered in Date Started Trading. It's working  - to a point.

If my Date Started Trading is set to 1/1/2016 - Years Trading displays 1. I'd like it to display 1.5 to reflect the 18 months it's been trading.

My calculated field looks like this:

Set Years Trading to DiffInYears(Date Started Trading, Now())
 

Is there anything I can do to make it display as I would like?

*This post is locked for comments

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Calculate Years Trading From Date Started Trading

    Ah.. ok. I was wondering if, maybe, diffInMonths works "within a year".. but all seems to be good

  • MDS Profile Picture
    MDS 1,779 on at
    RE: Calculate Years Trading From Date Started Trading

    OK - I missed changing to DiffInMonths. Done that, and now it shows 2.08 which makes more sense.

    Thanks for your help.

  • MDS Profile Picture
    MDS 1,779 on at
    RE: Calculate Years Trading From Date Started Trading

    Thanks - I think I see where you're going but not sure / 12 is the correct formula. I tried that and it worked out the Years Trading from 5/5/2015 as 0.17!

  • Verified answer
    ashlega Profile Picture
    ashlega 34,475 on at
    RE: Calculate Years Trading From Date Started Trading

    You might want to try

    DiffInMonths(...) / 12

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

Featured topics

Product updates

Dynamics 365 release plans