web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
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,985 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans