COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: kbasha2004 on 13 May 2008 11:52:29 AM

Title: Date format MMM-DD-YY
Post by: kbasha2004 on 13 May 2008 11:52:29 AM
Hi friends,

The date format in Database is timestamp "2007-05-13:00:00:00" but I need to display such as MMM-DD-YY "May-13-08".

so I used CAST(Date_field,Date) which is displaying as "May-13-2008" but I need to display year only 2 digits.....  like this "May-13-08". Please suggest me how to do.

Thanks in Adv

kbasha2004
Title: Re: Date format MMM-DD-YY
Post by: almeids on 13 May 2008 12:35:43 PM
If your data item is already a date or datetime you don't need to cast it to anything else.  Just put it on your report and use the Data Format property to format it however you like.
Title: Re: Date format MMM-DD-YY
Post by: kbasha2004 on 14 May 2008 09:50:46 AM
Hi Almeids,

Thanks for your reply,since the the date_field is in Datetime type,I tried in property settings of the reportnet. I was able to display the value as per the requirement on the report field but not the Report period displayed on the report is a paramter value as input.

The paramter is runtime and the prompt looks like Date time calendar prompt not as Date prompt and it displays "Apr-08-08:12:00Am" on the report.

Please suggest

Thanks,

Kbasha2004
Title: Re: Date format MMM-DD-YY
Post by: almeids on 14 May 2008 11:01:25 AM
To format a date parameter, you need to put it in a data item and then put the data item on your report