Hi Guys, I know this question has been beaten to death before. But either which way. Have not been able to work it out.
I have a date-time column, which I would like to convert into char.
The reason is that I want to create grouping on the specific day of the date. Not the hour/minute.
1. So one alternative is to convert it from date/time to date.
2. Otherwise also just to convert it to string. where I would remove the time by 'YYYY-MM-DD'.
I have tried to use to_char([ITEM], 'YYYY-MM-DD'), but i get an error:
general exception has occurred during the operation "open result".ORA-01861: literal does not match format string
Solved by: cast([Date Item], date)
Still curious to why it didnt work in the beginning
because to_char is an Oracle function which could be recognized by Cognos.