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 display my date in GMT?
BIRT F-Type Fan
<p>How to change my local time to display GMT time? I have a datetime variable and function is - dataSetRow["ActivityDate"] . I want to display both columns with my local time and another with GMT time.</p>
Find more posts tagged with
Comments
micajblock
<p>It is not a simple format as the date needs to be converted to UTC (GMT) and that depends on your time zone. Attached is a sample design that uses a scripted data source so you should be able to run it. </p>
<p> </p>
<p>The expression for the UTC date is:</p>
<pre class="_prettyXprint">
new Date(row["ActivityDate"].getUTCFullYear(), row["ActivityDate"].getUTCMonth(), row["ActivityDate"].getUTCDate(), row["ActivityDate"].getUTCHours(), row["ActivityDate"].getUTCMinutes(), row["ActivityDate"].getUTCSeconds());</pre>
bgbaird
<p>This bit of magic will convert localDT to a UTC String. You can then convert it to a DT.<br><br>
var localDT = new Date();<br>
var utcString = localDT.toUTCString();</p>
<p> </p>
<p>Brian</p>
padytom
<p>How do I convert integer to a Time format after using this computation</p>
<p> </p>
<p>BirtDateTime.diffHour (BirtDateTime.now(),row["TARGSTARTDATE"])</p>
micajblock
<p>Please start a new topic as this is not related to the title of this post.</p>
<p> </p>
<p>P.S. Please provide details on what the inter is (how it applies to time)?</p>