Question

1
Replies
197
Views
AnirDas1 Member since 2016 6 posts
Tata Consultancy Services
Posted: 2 years ago
Last activity: 2 years ago
Closed

How to check Business Calendar holidays using SQL function in Report Definition

We have a requirement to create a report definition that will list all the cases got resolved yesterday considering weekends and business holidays. For example, if the report is being run on Monday then Saturday and Sunday being weekends it will check if Friday is Business holiday or not. If Friday is Holiday as per the business calendar then it will fetch the results for Thursday. Else it will get the results for Friday.

We have an instance of calendar (Data-Admin-Calendar) in our application where Closed days are mentioned. We have also written a SQL function to consider weekends. However we are not sure how to incorporate/check for Business Calendar holidays using the SQL Function.
Given the above scenario please help us on how to check if some particular day is a holiday as per the business calendar using the SQL function.
The DB we are using is PostgreSQL.
Any early help would be highly appreciated.
Reporting
Moderation Team has archived post
Share this page LinkedIn