Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
DateTime Dimension header to text
Maxwelll
Hi,
I have a report where I add dynamically some date dimension. It's work fine but the headers corresponding on those dimensions are in number. The question is how can I translate this number in text (ex: month 1 => january).
Thanks in advance
Find more posts tagged with
Comments
RichT
Would this work for you?<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>importPackage(Packages.java.text);
myDateDim = "1" //your date dim value here
sdf1 = new SimpleDateFormat("MM");
sdf2 = new SimpleDateFormat("MMMMM");
testDate = sdf1.parse(myDateDim);
testDate = sdf2.format(testDate);</pre>
<br />
I'm not sure what your adding the date dimension to so I can't offer a suggestion as to where/which event to add this code to. Hope it helps.<br />
<br />
Rich