Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Add Days to a Date

(0) ShareShare
ReportReport
Posted on by 15

Hello all, I would like to simply add days to a date already set with a calculated field. I do not know the formula to do so.

Example:

I have a date 01/01/2020 I would like to add 30+ days to this date, making the date 01/31/2020. What formula do I enter into the calculated field.

Secondly, I also would like to calculate an "End of Month" field. So this would be for another date field. If I have that date set and I wanted to calculate the end of the month from a set date in another field. What would be the formula for that?

Thank you all,

  • rexkenley Profile Picture
    rexkenley 110 on at
    RE: Add Days to a Date

    Hi UDA

    Check this libray.

    date-fns.org/.../endOfMonth

  • Suggested answer
    RE: Add Days to a Date

    For date  field different formaulas like AddDays, AddMonths are available. You can choose required formula to do the job.

    pastedimage1579661442772v2.png

    for end of month field you can write a flow to calculate end of month date and update the field.

  • UDA_Solomon Profile Picture
    UDA_Solomon 15 on at
    RE: Add Days to a Date

    Thank you so much.

    I want to add 1 month or the next month to the current date. How do I do that?

  • Suggested answer
    Naveen Ganeshe Profile Picture
    Naveen Ganeshe 3,393 User Group Leader on at
    RE: Add Days to a Date

    Hello,

    You can add the below line in the ACTION section of the calculated field:

    ADDDAYS (whole number(no of days), date and time(source Datetime field in which you want to add the 30 Days))

    for more details, you can follow below links:

    https://www.encorebusiness.com/blog/dynamics-crm-calculated-fields/ 

    https://dynamicsofdynamicscrm.com/2015/01/13/useful-to-know-calculated-fields-functions-and-considerations-for-dynamics-crm-2015/\

    Hope It will be helpful

  • UDA_Solomon Profile Picture
    UDA_Solomon 15 on at
    RE: Add Days to a Date

    Outside of the Business rule, there is a "ADDDAYS()" function in the calculated date field. I just dont know the formula to do so.

  • Suggested answer
    Paul_Owen Profile Picture
    Paul_Owen 2,027 on at
    RE: Add Days to a Date

    Hi, you could create a business rule and set the field value Type to formula and add the 30 days however, I'm not 100% if this will work for a calculated field but you can test that.

    As for the end of month field are you trying to get how many days left in the month? you could create a calculated field and use the diffindays operator to get how many days left.

    pastedimage1578581912624v1.png

    Regards

    Paul

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,401 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans