COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Hinky on 02 Nov 2010 10:48:18 AM

Title: report to pull birthday two months in advance
Post by: Hinky on 02 Nov 2010 10:48:18 AM
I had been using this:

extract(month,[My Employees].[EEO/I-9].[Birth Date]) = extract(month,current_date) +2

to pull a report of employees who had a birthday two months from the current date.. but it suddenly stopped working.

Any ideas as to why? I've not changed anything in the report.

Thanks so much!   :)
Title: Re: report to pull birthday two months in advance
Post by: Lynn on 02 Nov 2010 11:18:22 AM
I think it is because you are adding the number 2 to the extracted month. The month number for November plus 2 equals month 13 and there ain't no such critter.

Add two months to the current date and then extract the month.
Title: Re: report to pull birthday two months in advance
Post by: CognosPaul on 02 Nov 2010 12:08:22 PM
ahem ::) (http://www.cognoise.com/community/index.php/topic,11230.msg36774.html#msg36774)