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 :
Microsoft Dynamics CRM (Archived)

Calculate SLA Duration excluding weekend and holidays

(0) ShareShare
ReportReport
Posted on by

Hello everyone , 

I'm trying to calculate the duration for each SLA KPI instance in Dynamics 365 , 

 so we have the created on date and succeeded on date , and i can calculate the duration without excluding weekends and holidays

I already tried this solution , but i think it's calculating (Saturday and Sunday ) as weekends and it's giving 0 as a result most of times : 

https://community.dynamics.com/enterprise/b/razdynamics365/archive/2017/01/30/calculate-duration-of-business-days-in-dynamics-365-crm

Any ideas  ?

THANKS . 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    buena-dev Profile Picture
    10 on at

    Hi, I know this question was posted three years, and just recently I had a similar challenge. After looking at the different entities involved, I wrote a plug-in that calculates the total number of hours and minutes spent against the SLA. The code I posted here can be a good start.

  • Suggested answer
    Bipin D365 Profile Picture
    28,983 Moderator on at

    Hi,

    Thanks for sharing,

    If found helpful, Please mark my answer verified.

  • buena-dev Profile Picture
    10 on at

    You're welcome! I just realized the link attached to my first reply doesn't work. Here's the complete link:

    buena-dev.com/.../crm-plug-in-that-calculates-sla-duration

  • JayadeepuDadi Profile Picture
    15 on at

    Hi Bipin, could you please provide the link for this solution.

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 > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans