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

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

calculate the number of working between two dates excluding weekend and Holidays

(0) ShareShare
ReportReport
Posted on by 1,751

Hi All,

i am developing a report based on production order ,i want to calculate the number of working days between two dates ,excluding holidays and weekend .kindly guide  me how should i approach ? is there any functionality in nav 2009 (indian ) base version .

Thanks in Advance 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Mohana Yadav Profile Picture
    60,993 Super User 2025 Season 2 on at
    RE: calculate the number of working between two dates excluding weekend and Holidays

    Check Codeunit 7600 Calendar Management

  • Amol Salvi Profile Picture
    18,698 on at
    RE: calculate the number of working between two dates excluding weekend and Holidays

    As Mohana suggested Codeunit 7600 will give you more functions to calculate these difference.

  • javedakhtar Profile Picture
    1,751 on at
    RE: calculate the number of working between two dates excluding weekend and Holidays

    Hi Sir

    i am getting an error in

    CUCalMgmnt.CheckDateStatus(CompanyInfo."Base Calendar Code",TempDate."Period Start",TempDescription);

  • Mohana Yadav Profile Picture
    60,993 Super User 2025 Season 2 on at
    RE: calculate the number of working between two dates excluding weekend and Holidays

    what is the error?

  • javedakhtar Profile Picture
    1,751 on at
    RE: calculate the number of working between two dates excluding weekend and Holidays

    Hi Sir .

    the error is an unknown variable. Base Calendar

  • javedakhtar Profile Picture
    1,751 on at
    RE: calculate the number of working between two dates excluding weekend and Holidays

    Hi Sir

    this is the error

    an unknown variable. Base Calendar Code

  • Verified answer
    Mohana Yadav Profile Picture
    60,993 Super User 2025 Season 2 on at
    RE: calculate the number of working between two dates excluding weekend and Holidays

    What is the variable type CompanyInfo?

    Do you have Base Calendar Code field in Company Info table?

  • javedakhtar Profile Picture
    1,751 on at
    RE: calculate the number of working between two dates excluding weekend and Holidays

    Hi Sir ,

    i have resolved that error but got the run time error

    Company Information Primary Key '' does not exist

  • javedakhtar Profile Picture
    1,751 on at
    RE: calculate the number of working between two dates excluding weekend and Holidays

    Hi Sir

    Thank You SO much Mohana sir and Amol Sir ,ny problem has been solved

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 NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans