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!

Can't use datedaydiff on a calculated field!

Status
Not open for further replies.

feltonam

MIS
Oct 1, 2003
20
GB
I am working with an old version of Cognos(6) on a HR report to show the number of days absence in any given month. It lists all open ended absences, and also those that ended during a period defined by a date prompt.

I've also got it to calculate the number of days absence within the period. eg: Tell me the number of days during the calender month of August from an absence that started on 18th July and ended on 12th September.

If I then try to work out the number of days between the calculated start and End Dates for the period by simple subtraction, no. of days is wrong eg: a one day absence would have the same start and finish date, so a basic subtraction will result in zero days (and so on...).

I think I need to use datedaydiff, or else + 1 somehow to get it right, but can't work out how to do this. It's not available in the list of functions, presumably because the source is a calculated field. Any help appreciated.
 
Use the function Date-to-days-from-1900(Date) for the start and end date ans then subtract the 2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top