COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: s.aravindkumar on 04 Oct 2017 07:35:13 AM

Title: Converting datetime into date for ODBC datasource
Post by: s.aravindkumar on 04 Oct 2017 07:35:13 AM
Hi,

I am using cognos report studio and
I have used Optim(IBM Product) archive file as a datasource which will connecting to cognos through Open data manager/ODM(IBM Product).
In database I have the data as 11-NOV-98 but in ODM its showing as Nov 11, 2010 12:56:34 so in cognos also its showing same as ODM.

So to convert the date time to date I was trying Cast but that is not working so can someone suggest how to convert datetime into date ?

Thanks and Regards,

Aravind Kumar Sekar
Title: Re: Converting datetime into date for ODBC datasource
Post by: MFGF on 04 Oct 2017 09:12:10 AM
Quote from: s.aravindkumar on 04 Oct 2017 07:35:13 AM
...So to convert the date time to date I was trying Cast but that is not working so can someone suggest how to convert datetime into date ?

Hi,

Can you tell us what "that is not working" actually means? Do you get an error? An incorrect result? No result? Something else? Can you provide details?

What exact syntax did you use for your Cast expression?

MF.
Title: Re: Converting datetime into date for ODBC datasource
Post by: BigChris on 04 Oct 2017 09:27:07 AM
cast([Your DateTime Field], date) should do the job for you