COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gosoccer on 16 Jul 2015 11:44:47 AM

Title: ParamDisplayValue('BeginDate') and Date Format in Report Author 10.2.1
Post by: gosoccer on 16 Jul 2015 11:44:47 AM
Hello guys,
I'm displaying the start and end date of a Query. The Start and End Dates are using Date Prompt with the Calendar Selection.

I have to display the date as a part of the report body in the same format as the body of the report. For example, this format is 05/01/2015 (mm/dd/yyyy).

ParamDisplayValue('BeginDate')

Does anybody know how to change the date format to mm/dd/yyyy. I have attached what I have tried but it is not giving me the right format. Please see attached.

Thx so much for your time. I really really appreciate it.



 
Title: Re: ParamDisplayValue('BeginDate') and Date Format in Report Author 10.2.1
Post by: TheFrenchGuy on 17 Jul 2015 03:54:15 AM
Hi,

in the date format, in order to fill "Date Style", "Date Separator", "Date Ordering" ...
Go to "Pattern" (before the last row in Data format) and Enter 'MM/DD/YYYY' to pattern field

(http://i62.tinypic.com/1zyj79h.jpg)

Let me know
Title: RESOLVED ParamDisplayValue('BeginDate') and Date Format in Report Author 10.2.1
Post by: gosoccer on 17 Jul 2015 05:49:50 AM
Thank you.  :) :)I actually tried that and didn't work. I finally used the following approach:

Report Expression: String2timestamp(paramValue('BeginDate'))
Date Format )Property: See attached.
(Long, /,Month, Day, year,Years:Yes,Months two digits,Day two digits, No Pattern)

Thank you for getting back to me.