Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Calculated field with dateTime fields

Posted on by Microsoft Employee

i have created two Date &time field with the following details.

Calculated-field.JPG

then I created another total time field, with data type as Date&time and Field type is Calculated. while giving action to the calculated field i am getting the follwing error:

You can't use new_startdate, which is of type dateTime, with the current operator.

can anyone  help me in this?

*This post is locked for comments

  • RE: Calculated field with dateTime fields

    Hello Vijay,

    Unfortunately, You cannot use Calculation field to calculate two dates..

    Source:

    blog.sonomapartners.com/.../dynamics-crm-2015-calculated-and-rollup-fields.html

    "Unfortunately I don't think you can subtract two dates. I just tried this in a calculated field (new_date1 - new_date2) and I got an error "You can't use new_date1, which is of type dateTime, with the current operator"."

    And I tried it before, not supported.

    Try to refer this link as well.

    community.dynamics.com/.../357056

    You can Try to achieve this by using Workflow or JavaScript as mentioned here in this

    Example :

    us.hitachi-solutions.com/.../duration-calculations-in-crm-with-little-or-no-customizations

    I Hope this helps you.

    Thanks.

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Calculated field with dateTime fields

    Your Calculated field data Type should be Whole Number or decimal if you are trying to calculate duration.

  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    Rajkumar Rajaraman 18,108 on at
    RE: Calculated field with dateTime fields

    Change the format to Date only

    Refer this:

    www.summitgroupsoftware.com/.../diffindays-calculated-field-datetime-fields

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,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans