Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Formatting DATE parameters for display
zax
Hello,<br />
<br />
I have a report with a user entered date parameter, which I also want to have in the resulting report. To do this I use a dynamic text box and the following code:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>BirtDateTime.year(params["StartDate"].value) + "-" + BirtDateTime.month(params["StartDate"].value) + "-" + BirtDateTime.day(params["StartDate"].value)</pre>
<br />
But this feels very clumsy, and the months are not formatted how I would like. Is there a better way of formatting a date parameter?<br />
<br />
Many Thanks,<br />
Stephen
Find more posts tagged with
Comments
mwilliams
Hi Stephen,
You should be able to just display your parameter in a data element and use the dateFormat in the property editor to format the date how you'd like.
Hope this helps.
zax
Excellent! Thanks for your help. Easy when you know how!
mwilliams
Ha! This is true! Always glad to help. Let us know whenever you have questions!