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

Holiday Calendar

(0) ShareShare
ReportReport
Posted on by 560

How would GP HR know if there is a public holiday or any other non working day? If a person applies for vacation and a holiday falls within the time requested when this vacation request is entered would GP HR have the holidays stored anywhere so it would not calculate the holiday as a vacation day? Is there any where to set this up?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Jody Wood Profile Picture
    405 on at

    This may not help you because (I think) you have to have the Manufacturing for GP module installed, but I was faced with a similar issue.  Here is the approach I took to create a SQL table, view and ultimately a report to determine scheduled Down Days in GP.

    GP>Tools>Setup>Manufacturing>System Defaults>Calendar will open a Shop Calendar (this requires system password).  At first I selected the radio button next to Saturdays and Sundays as a Down Time setting, but the query I wrote ignores this (besides the setting only changes one value in the DD020000 table and does not list dates).  The useful thing about this calendar is that when you click on a day (such as a holiday), a table gets populated with all of the down days for that month - very useful.

    Since the GP tables don't list ALL dates, I needed to build a Calendar table.  I borrowed some SQL code that I found somewhere online and modified it to fit my needs:

    Code:
    --Create Calendar Table

        CREATE TABLE Calendar
        (DayNumber INT IDENTITY(1,1) PRIMARY KEY CLUSTERED, CalendarDate datetime)
        WHILE COALESCE(SCOPE_IDENTITY(), 0) <= 18263  --This number allows for a 51yr calendar
             BEGIN
                   INSERT Calendar DEFAULT VALUES
             END

    Code:
    --Insert Dates in to Calendar Table

        Declare @dt varchar(20)
        Set @dt='12311999'  --Using this inserts dates from 1/1/2000 through 1/1/2050
            Update Calendar
            Set CalendarDate = convert(datetime,substring(@dt,5,4)+substring(@dt,1,2)+substring(@dt,3,2),112)+DayNumber
     

     Now that I have a calendar table, I need to pull out only scheduled work days:

    Code:
    --Create Calendar_DaysOff View
        Create View Calendar_DaysOff as
            SELECT DayNumber, CalendarDate
            FROM Calendar
            WHERE (((DATEPART(dw, CalendarDate) + @@DATEFIRST) % 7) NOT IN (0, 1)) AND (CalendarDate NOT IN (SELECT DOWNDAYS_I  FROM DD010000))
     

    This view/statement looks at the Calendar table I built, removes weekends, and then looks at the DD01000 table to remove any additional dates that have been defined in the Shop Calendar in GP.</p> <p>I can now create an exception report that alerts me if a specific date falls on a scheduled Day Off.  In my case, I am using the ReqShipDate on SOP orders, but you could just as easily use any date in the system.

  • Community Member Profile Picture
    on at

    you also have another calendar in GP, the stock count calendar  GP > Tools > Setup > Inventory > Stock Calendar

    and you dont need manufacturing, and as well you can see where this data is stored and modify the code provided by Jody

  • Jody Wood Profile Picture
    405 on at

    Cool, I didnt know about that one.  For reference it lookslike the DD01000 table in my code above can be replaced with IV41001 when using the calendar suggested by Francisco.  Additionally, I wasn't prompted for the system password to access the Stock Calendar.  :-)

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

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans