Skip to main content

Notifications

Announcements

No record found.

Dynamics 365 general forum

Adding a whole number to a date field

Posted on by 25

I have a date field in an entity and wish to add a whole number, "terms" to know the due date of an invoice.

1362.Capture.JPG

How do i do this.

Categories:
  • Tim_Hof Profile Picture
    Tim_Hof 40 on at
    RE: Adding a whole number to a date field

    Are there any suggestions how to do this in a workflow?

    I want to change 2 datefields in a workflow. Booking date I set to 'changed on', and due date I want to set to 'Changed on' + 'Due days'(integer field on the same entity). Recommendations for doing so?

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Adding a whole number to a date field

    Hi partner,

    Don't forget to click Yes to mark the verified answer.

    4863.png

    This will help other users quickly navigate to this theme.

    Tnanks. 

  • Suggested answer
    VICKIM Profile Picture
    VICKIM 25 on at
    RE: Adding a whole number to a date field

    Perfect.  Thank you so much.  Works a treat.  

  • LuHao Profile Picture
    LuHao 40,872 on at
    RE: Adding a whole number to a date field

    Hi partner,

    Based on the error message in your screenshot, your calculated field appears to be of text type, not Date type.

    Please check the data type of your calculated field.

    As in my last answer, it must be a Date type.

  • VICKIM Profile Picture
    VICKIM 25 on at
    RE: Adding a whole number to a date field

    I tried above but no luck.  Not sure if it is because data is stored in two different entities. The field i am trying to add "invoice due date" is located in entity "Invoice".  The terms are located in the entity "vendor"

     0841.Capture.JPG

  • Verified answer
    LuHao Profile Picture
    LuHao 40,872 on at
    RE: Adding a whole number to a date field

    Hi partner,

    You still need to use the formula ADDDAYS(whole number, date and time).

    The whole number can be a field, not necessarily a fixed number.

    The following is an example:

    "invoice date" is a field of type Date.

    "sap terms" is a field of type Whole Number.

    7028.png    81060.PNG

    "invoice due date" is a calculated field of type Date. I set the calculation logic to ADDDAYS(new_sapterms,new_invoicedate).

    2376.png    1588.png

    The effect is as follows:

    06834.PNG    66434.PNG

  • VICKIM Profile Picture
    VICKIM 25 on at
    RE: Adding a whole number to a date field

    The issue i have is some vendor terms are different for each vendor.  some are 7 days, others 14 days and others 30 days.

    So i need to add either 7,14 or 30 to the vendor invoice date depending of the terms.

  • Suggested answer
    Adrian Begovich Profile Picture
    Adrian Begovich 21,009 Super User 2024 Season 2 on at
    RE: Adding a whole number to a date field

    Hi VICKIM,

    You can use the ADDDAYS (whole number, date and time) function to return a new date and time that is equal to the given date and time, plus the specified number of days.

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans