Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Date Formatting Property
Bhumi U.
Hi.
How can i format the date, using birt date formatting property so it comes in "DD:MM:YYYY,HH:24MI:SS GMT" format?. When i try with "h:mm:ss a z", I see, "DD:MM:YYYY,HH:24MI:SS CST" always. how can i format it so it comes as GMT instead of CST?
Find more posts tagged with
Comments
mwilliams
If you just need the output of the date, you can use .toGMTString() and it will change the output to the correct output, but it'll be a string and not a dateTime.
If you're wanting it to still be a dateTime field, you can do something like:
temp = new Date();
minutes = temp.getTimezoneOffset();
BirtDateTime.addMinute(temp,minutes);
This won't change CST to GMT, but you can format it as such.
Hope this helps.
Bhumi U.
Thanks Michael, <br />
date.toGMTString()function is working fine .Thanks for your response.<br />
<br />
Bhumi<br />
<br />
<br />
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="95167" data-time="1328645669" data-date="07 February 2012 - 01:14 PM"><p>
If you just need the output of the date, you can use .toGMTString() and it will change the output to the correct output, but it'll be a string and not a dateTime.<br />
<br />
If you're wanting it to still be a dateTime field, you can do something like:<br />
<br />
temp = new Date();<br />
minutes = temp.getTimezoneOffset();<br />
BirtDateTime.addMinute(temp,minutes);<br />
<br />
This won't change CST to GMT, but you can format it as such.<br />
<br />
Hope this helps.<br /></p></blockquote>
mwilliams
You're welcome! Let us know whenever you have questions!