If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Business hours in a time interval data item

Started by DaniEU, 14 Jul 2018 08:46:40 AM

Previous topic - Next topic

DaniEU

Hi,
I had a request to display a number of hours till a target time.
For instance we have a target date/time (let's say next Tuesday at 11AM) and the report should display time interval between NOW and this target date/time, but business hours only, so week end off and non working hours also off.
I'm using Cognos 10.2.2 against salesforce.com.

I can calculate number of hours but how can I remove the non working hours?
Working hours are Sunday-Thursday 08:00 - 17:00, Friday 08:00 - 12:00.

Thanks in advance,

Daniel

BigChris

Hi Daniel,

It's going to be a mighty big calculation, unless someone has something that will already do it. Essentially, you're going to have to work out how many weeks there are between today and the end date so that you can work out the weekends, but even that is difficult since you're working on Sundays. I think there might be an options to say when the week starts (which would help you out with that) but I don't know for sure. Basically, there's nothing built in - you're going to have to work out all the bits between today and the target date then add them all up...it's not going to be easy.

DaniEU

Hi BigChris,

I have an answer from another site that appears to be a simple solution.
I will create a new table with dates and values, where every day we have a value of work hours, where weekends, holly days, and so on will have a value of zero. Then just sum the dates between, and subtracting the first hours of the first day, and last hours of last day.
To create this table, I'm creating a Linux script.

Thanks for your help!