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)
Birt data cube duration format
Rayman
hi<br />
I have a MAXIMO report the require data cube and <br />
that is making problem in formating data as duration<br />
<br />
668.4166666666666673 to be 668:25<br />
<br />
may SQL result look as flow<br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>WO_CATEGORY PARENT HOURS
COMM AMOC_DPT 108
COMM GAS OIL MAXIMIZATION 12
COMM LUBE OIL EXPANSION 26
COMM OIL MOVEMENT 14
COMM UTILITY 17
ELEC AMOC_DPT 668.4166666666666673
ELEC GAS OIL MAXIMIZATION 383.5833333333333152
ELEC LUBE OIL EXPANSION 400.06333333333332702
ELEC OIL MOVEMENT 220.78333333333333239
ELEC UTILITY 423.333333333333332
HVAC AMOC_DPT 909.93333333333333131
HVAC GAS OIL MAXIMIZATION 108.24999999999666599</pre>
Fetch <br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
row["WO_CATEGORY"] = maximoDataSet.getString("WO_CATEGORY");
row["PARENT"] = maximoDataSet.getString("PARENT");
row["HOURS"] = maximoDataSet.getDuration("HOURS");
</pre>
Output<br />
Find more posts tagged with
Comments
mwilliams
You could delete the measure from your crosstab and put a text or dynamic textbox in its place, then you could calculate how many minutes the fraction of the hour is and then display your figured value in the format you'd like. Let me know if you have questions.
Rayman
Thanks for replying
I will try that right away.
Rayman
My solution <br />
<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
Math.floor(dataSetRow["HOURS"]) + ":" + Math.floor((dataSetRow["HOURS"]*60)%60)
</pre>
<br />
mwilliams
Perfect. Let us know whenever you have questions!