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)
Getting date in BIRT based on user calendar
Ahmad.Bgd
<p>Hello there,</p>
<p> </p>
<p>I am designing a report using BIRT 3.7.1 to be used with Maximo SmartCloud Control Desk 7.5.1.1.</p>
<p> </p>
<p>All I want to do is to make sure that the date function I use in BIRT returns the date according to the calendar type that the client user machine is using.</p>
<p> </p>
<p>For most people, the calendar type is the Georgian (January, February ... etc) calendar. However, in the project we are working on, users use a calendar on their computers known as Islamic or Hijri calendar, it is simply changed from windows regional and language setting.</p>
<p> </p>
<p>My question is: How can I make the BIRT report I am designing get the date from the machine of the user himself?</p>
<p> </p>
<p>If he uses Georgian: He should get a date like 09\11\2014</p>
<p>If he uses Islamic : He should get a date like 16\01\1436</p>
<p> </p>
<p>Currently, I am using the new Date () function , it returns the Georgian language on the machine using Islamic calendar.</p>
<p> </p>
<p>Also, I tried the following code in an expression in a data element:</p>
<p> </p>
<div>var d = new Date(); </div>
<div>var n = d.toLocaleString(); </div>
<div>this.text = n;</div>
<div> </div>
<div>Still, it returns Georgian representation or format.</div>
<p> </p>
<p>Would very much appreciate any ideas / suggestions.</p>
<p> </p>
<p>Thanks in advance!</p>
Find more posts tagged with
Comments
mwilliams
Would it be easy enough to do the conversion of the date yourself based on the machine? I don't know that I have a great way to test on this.