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)
how to show the UTC date and time
sangram
<p>Hi,</p><p> </p><p>Could you please tell me, how to display UTC date and time in footer part in pdf using Eclipse BIRT Designer Version 3.7.1 ?</p><p> </p><p>I did like YYYY-MM-dd hh:mm:ss in format code but it is not displaying perfect time.</p><p> </p><p> </p><p>Regards,</p><p>Pankaja</p>
Find more posts tagged with
Comments
fmakwsi
<p>working on quite the same atm, wont work for me aswell :x</p>
bgbaird
<p>Sangram, what do you mean "perfect time"?</p><p> </p><p>Brian</p>
bgbaird
<p>Here is a solution that I use,</p><p>the output looks like this: "12/17/2013 16:48:09 UTC"</p><p> </p><p>Brian</p><p> </p><p>df = new Packages.java.text.SimpleDateFormat("MM/dd/yyyy H:mm:ss")//define format
var localDT = new Date();//get current local DT
var offsetMin = localDT.getTimezoneOffset();//get minute offset to UTC
var utcDT = BirtDateTime.addMinute(localDT,offsetMin);//add minutes to localDT to get UTC
var utcStr = new String(df.format(utcDT)+" UTC");//format and build string
utcStr;</p>
fmakwsi
<p>ah thx :-) my thought was a easier way but ok
</p>