If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Noob Question: Date to String

Started by mixim, 22 Oct 2014 12:25:05 PM

Previous topic - Next topic

mixim

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

mixim

Solved by: cast([Date Item], date)

Still curious to why it didnt work in the beginning

cognostechie

because to_char is an Oracle function which could be recognized by Cognos.