converting a number to a date.
Hi,
I have a database table that has a numerical column. Now the problem is that the values it contains have actually been populated by a JAVA program that has put JAVA Date objects as long values inside this column.
I want to convert them back into a date that can be used for grouping in my report. Is there a BIRT function that can do this for me? can i do this using JavaScript?
Thanks in advance.
I have a database table that has a numerical column. Now the problem is that the values it contains have actually been populated by a JAVA program that has put JAVA Date objects as long values inside this column.
I want to convert them back into a date that can be used for grouping in my report. Is there a BIRT function that can do this for me? can i do this using JavaScript?
Thanks in advance.
0
Comments
-
Hi birtnewbie,
That's an interesting username you chose for yourself since I suspect over time you will progress from birtnewbie to birtintermediate and finally to birtguru.
In any case, I ran into a similar problem where the dates were being stored as EPOCH dates in our database. To get past this, I created a computed column on my data set. I called it 'realdate', set it as a Date format, and had the following expression.
var d = new Date()
var mEpoch = parseInt(row["origdate"]);
if(mEpoch<10000000000) mEpoch *= 1000;
d.setTime(mEpoch)
d;
I can then use this new computed field instead of the original field and perform proper grouping in tables and charts.Warning No formatter is installed for the format ipb0 -
Vdodson,
First of all, thank you for that warm welcome into the BIRT world, and birt-exchange. And thanks a ton for giving me that pointer. I suspected something like this would be used, but was not sure. Thank you for clarifying
looking forward to sharing knowledge (and gaining it) on birt-exchange.0
Categories
- All Categories
- 108 Developer Announcements
- 53 Articles
- 106 General Questions
- 145 IM Services
- 43 OpenText Hackathon
- 32 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 899 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management