web
You’re offline. This is a read only version of the page.
close
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

How to calculate a license end date based on start date, cancellation date and period (month/year).

(0) ShareShare
ReportReport
Posted on by 5

How to calculate a license end date based on start date, cancellation date and period (month/year).

For instance:

- a clients’ starts a user license on January 5, 2019 (start date),

- the license period is set to a month (period),

- on October 12, 2019, the client has let us know that he wants to end the license (cancellation date),

- Since the period is set to a month, the first possible end date should be November 4, 2019 (license end date)

How can we calculate the license end date based on start date, cancellation date and period (month/year)?

I have the same question (0)
  • Suggested answer
    Roma Gupta Profile Picture
    725 on at

    Hi HappyMarcel

    Please make me understand the cancellation date & period in your example.

    How come if a period is a month, end date would be November 4 & not November 12?

    Period is like a notice period which would be applicable post cancellation date?

    So end date = cancellation date + Period?

    Regards

    Roma

  • Happymarcel Profile Picture
    5 on at

    Hi Roma,

    Thanks for the reply.

    Period is fixed (month). So if a client starts a license (subscription) on the 2nd of January, the first possible End Date would be the 1st of February (subscription start date + subscription period).

    In my previous example we've received the cancellation from the client on the 12th of October, which means that the earliest Subscription End Date is November 4 (Subscription Start Date (January 5) + Subscription Periods). I guess the easiest would be to calculate the number of months from the Subscription Start Date to the Subscription Cancellation Date and round this number up. With the number of months we can calculate the Subscription End Date from the Subscription Start Date. My main concern is how to calculate the Number of months and round these up.

    Hopefully this is clear now. If not, just let me know.

    Kind regards,

    Marcel

  • Suggested answer
    Roma Gupta Profile Picture
    725 on at

    Hi Marcel

    So If I understand correctly, you are also calculating days for subscription periods if its not starting at 1st of the month.

    What I can think of is call a plugin as soon a cancelled date is entered. You would have to have simple calculations in place for months, days, leap year & get it done. That would be simplest.

    Here are some URLs:

    dotnetcodr.com/.../

    www.w3resource.com/.../csharp-datetime-exercise-55.php

    stackoverflow.com/.../difference-in-months-between-two-dates

    codereview.stackexchange.com/.../loop-months-between-a-time-span-yyyy-mm-and-yyyy-mm

    Hope this helps!

    Regards

    Roma

  • Happymarcel Profile Picture
    5 on at

    Hi Roma,

    Thanks for the reply. Since I'm not a developer, I was hoping to have this somehow arranged within the boundaries of Dynamics instead of coding. Do you have any idea if this is possible?

    Kind regards,

    Marcel

  • Suggested answer
    Roma Gupta Profile Picture
    725 on at

    Sorry Marcel. I don't think the exact solution is possible via config only.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 170 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 70

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans