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)
Formatting a date in my dataset to the correct timezone
jgisler
Hello,<br />
<br />
I would like to know how to use the Data formatting properties to render a date in my report to the configured timezone.<br />
<br />
In the Engine configuration we set the timezone and the timestamp in the footer appears correctly.<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
task.setTimeZone( getTimeZone(dataSource) );
.
.
.
private com.ibm.icu.util.TimeZone getTimeZone(OutputOption outputOption) {
return outputOption.getTimeZone() != null
? com.ibm.icu.util.TimeZone.getTimeZone(outputOption.getTimeZone().getID())
: null;
}
</pre>
<br />
However, in my report, the date fields are not adjusting for this timezone setting. I was looking for more information in the Date format property tab but I don't see this functionality.
Find more posts tagged with
Comments
jgisler
We answered our own question
The datasource type was Date but when we set the type to Datetime, the date will render to the correct timezone. Apparently the Date type truncates the time information (which makes sense).
In other words,
1/1/2010 23:00:00 PST will render as 1/2/2010 EST in the report, which is correct.