Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Extending dates in dbo.calendar

(0) ShareShare
ReportReport
Posted on by 20

I think our year/date range has reached its limit, how do I insert more dates or do I have to re-create dbo.calendar? if so I'm fairly new with this any inputs would be really highly appreciated.  
We have an SSRS "Productivity Summary Report" the values on "HRS_PAID" has returned a value of  '0' since 2021 started. 
There's a custom report created by the previous IT that's looking up to the table dbo.CSGAUCalendar that performs a calculation against function dbo.CSGAUWorkingdays, I think it's returning '0' value because it cannot find YR2021 in dbo.CSGAUCalendar. 

[dbo].[CSGAUWorkingDays]
(
@startDate SMALLDATETIME,
@endDate SMALLDATETIME
)
RETURNS INT
AS
BEGIN
DECLARE @result INT
SELECT @result = COUNT(*)
FROM dbo.CSGAUCalendar
WHERE dt >= @startDate
AND dt <= @endDate
AND isWorkDay = 1;
RETURN @result
END

[dbo].[CSGAUCalendar] (
[dt] SMALLDATETIME NOT NULL,
[isWeekDay] AS (CONVERT([bit],case when datepart(weekday,[dt])=(7) OR datepart(weekday,[dt])=(1) then (0) else (1) end,0)),
[isWorkDay] BIT DEFAULT ((1)) NULL,
PRIMARY KEY CLUSTERED ([dt] ASC)

Categories:
  • Isaac Olson Profile Picture
    Isaac Olson on at
    RE: Extending dates in dbo.calendar

    Hello, 

    These look to be custom tables and a custom report.  Maybe it belongs to a Third Party application or was custom made for you, but none of these tables or this report look to be default items from the Microsoft Dynamics GP application.  Maybe someone else in the forums recognizes these tables or that report and can assist you.  Otherwise you may want to reach out to any Vendors or Consultants that you have worked with in the past as they may know where this customization comes from. 

    Thanks!

    Isaac Olson

    Microsoft Support

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,516 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,409 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans