Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date calculation for Public Holidays in Cognos Script

Status
Not open for further replies.

shrutika

Programmer
Feb 18, 2004
1
US
Hi

How do I do the date calucalation - for Public holidays
We have 9 Observed Holidays- as per NYSE stock Exchange
We have the ExchangeHolidays - table in the database - from which I created a ExchangeHolidays.imr Impromptu report( has 2 columns - Exchangename, ExchangeHolidaydate)
I want to be able to use the above report - in the macro and do the date calucation
I am not sure if this could be done using macro

Say
for 1/1/2004 - New Years Day - it was Thursday

I want the ReportRunDate - to be the previousday( that is Dec 31,2003 - Wednesday)
in case if the holiday - falls on a weekend - then the ReportRunDate - should be the PreviousBusinessday( that is the friday of last week) -

Say
for the memorial day - May 31, 2004 - which is monday - then I want to set the ReportRunDate - to be May 28,2004

Note - I have the ReportRundate(format yyyy-mm-dd) - set up as an Impromptu(Type-in) prompt


Please help.....
u'r feedback will be greatly appreciated

shrka
 
It looks like you could create some sort of function in your CognosScript macro that will do this for you. It should not be much more difficult than the explanation you have already given.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top