COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: jbanks2 on 18 Apr 2016 03:33:34 PM

Title: Data Format, Date, Pattern
Post by: jbanks2 on 18 Apr 2016 03:33:34 PM
Within a date field I am setting Data Format, Date, Pattern to input the following:  'Terminated Date =' MM/dd/yyyy

My report outputs results into Excel 2007.  The following displays in my Terminated Date field:  TerminAM/PMted DAM/PMte = 02/19/2016.

Everywhere there is an "a" in Pattern the "a" is replaced with "AM/PM"...

Any idea why this is occurring. 
Title: Re: Data Format, Date, Pattern
Post by: navissar on 19 Apr 2016 04:45:57 AM
Can't tell you why it's happening - could be an Excel peculiarity - but can offer some advice how to side step it: Just add your text in a layout calculation in the cell.
Title: Re: Data Format, Date, Pattern
Post by: bdbits on 19 Apr 2016 10:20:15 AM
I don't think you can put literal text into format patterns. It certainly appears to be interpreting the letter 'a' as an AM/PM in your pattern.

Like Nimrod said, just add the text in a calculated expression and use that.