Reputation: 1
In Cognos Reporting Studio I have a data item coming in that is a string representation of a date (varchar2). Example: 20230714
I need to display it in a column as a date in the format 'YYYY/MM/DD' without a timestamp. Example: 2023/07/14
I have used the cast function in the data item expression to convert it from a varchar to a date: cast([X].[Y].[Z], date)
The column is now displaying as a date in a 'Month Date, Year' format. Example: July 14, 2023
To change it to my desired format, I went to the column -> Properties -> Data -> Data Format. I believe there is then supposed to be a 'Date' type option, where I can then specify a pattern, but I only see 'Default' and 'Text'. Is this option no longer there?
So for now I have selected Text -> Pattern and applied 'yyyy/MM/dd'
However my output is still showing in the July 14, 2023 format. Any suggestions on how I can fix this? Is there maybe another function I can use in the expression itself?
Upvotes: 0
Views: 1541
Reputation: 1
Building on @dougp's prior response to this query I believe that the original query may have been referring to Crosstab node members (as opposed to columns). When faced with the same issue in a crosstab I was able to resolve this by:
Upvotes: 0