COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: srinidhi on 15 Mar 2011 05:51:05 AM

Title: problem with data types in cognos-- source is sql server
Post by: srinidhi on 15 Mar 2011 05:51:05 AM
hi all,

i have to do an expression which is as follows:

ordate - 1

cognos does not support this because ordate is date data type. subtraction is not allowed between date and int...

source is sql server..

cast and convert are not working. probably i might have given wrong...

Could you please help me...

thanks,
srinidhi
Title: Re: problem with data types in cognos-- source is sql server
Post by: PRIT AMRIT on 15 Mar 2011 07:01:49 AM
cast(CONVERT(VARCHAR(10), GETDATE(), 112),integer)

hope helps?

Thanks
Prit