Skip to main content



      Home
Home » Archived » BIRT » Timestamp vs date
Timestamp vs date [message #72673] Thu, 08 September 2005 10:32
Eclipse UserFriend
Originally posted by: fakeuser.poh.dynalias.org

I have the following code to get the value of a computed column
if(row["DISPOSITION_DATE"] != null)
{
row["DISPOSITION_DATE"];
}else{
new Date("0/0/00");
}

where row["DISPOSITION_DATE"] is a java.sql.Timestamp

I get the following error when I run the report
10:08:58,500 ERROR [STDERR] RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
Rhino runtime detected object 2005-08-01 15:33:18.421 of class java.sql.Timestamp where it expe
cted String, Number, Boolean or Scriptable instance. Please check your code for missig Context.
javaToJS() call.

The report itself also has the error:

There are errors on the report page:
- There are error(s) in Table:null
Error0 : Error.TableItemProcessingError(1 time)detail: There are problems(s) processing table .null

I need to compute this because I am sorting on the disposition_date, which may contain null values.


new Date(row["DISPOSITION_DATE"]) gets rid of the error in the report (not the rhino one), but the
date shows up as if I had used new Date("0/0/00").


How can I wrap this so that I get the correct date showing up in the report
(I don't mind the Rhino errors if that helps)

Thanks
Patrick
Previous Topic:EclipseCon Presentation Topics
Next Topic:Master page header and footer on PDF, only displayed on first page
Goto Forum:
  


Current Time: Mon May 12 03:02:13 EDT 2025

Powered by FUDForum. Page generated in 0.03391 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top