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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculating hours between two dates!!

Status
Not open for further replies.

vorvad

Technical User
Nov 21, 2001
9
0
0
US
Is there a way in Cognos to take two dates
i.e. (Thursday Jan 3,2002 5:30pm to Tuesday Jan 8, 2002 9:30 am)
and extract out the number of hours BUT only adding up the # of business days (mon - Fri)?
For example, using the above dates, the total # of hours would be 4 days, 16 hours (112 hours), but if you remove the weekends (48 hours), you would have 64 hours.

I can't seem to get the functions in Cognos to do what I want. I was thinking of creating two separate calculations, one, I would add up the # of Saturdays, and another the # of Sundays, and then multiply by 24 hrs.
I also have to take into account that the start date or end date may fall on a weekend, and I would not have a full weekend day to subtract from my total.

I hope this isn't too confusing and thanks in advance for any help!

Trevor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top