COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: so10070 on 30 Jan 2019 10:28:03 AM

Title: Impossible to convert char to date
Post by: so10070 on 30 Jan 2019 10:28:03 AM
I try to convert a character field to a date field.  The content of the field ([The 1st of September of the current schoolyear]) is
cast ([Date schoolyear] as varchar(4)) + '-09-01'
The [Date schoolyear]-field is a standard field of the BI.
Then I try to put it in a filter
[Earliest date assignment] >= cast([The 1st of September of the current schoolyear] as date)
I get always a date/char error!
In orther report it works fine! :(
Title: Re: Impossible to convert char to date
Post by: dougp on 30 Jan 2019 02:29:41 PM
What is the actual error message?
Can you provide at least one sample value from [Date schoolyear]?
Are there any values in [Date schoolyear] that do not look like 4-digit integers?
Title: Re: Impossible to convert char to date
Post by: so10070 on 31 Jan 2019 06:20:31 AM
Problem solved.  Was an error of Cognos itself! (dataconnection and so on)  :)