Unanswered: About Intervals
Well, I'm having some problems with intervals. Maybe someone could help me.
I'm using postgreSQL 7.3.3, Java and JfreeReport to deploy an application. Everythink is fine, but now I have a problem.
To generate a report, a need to calculate some intervals. For example
SELECT final_date - initial_date FROM someTable ;
and that will give me the desired interval. But, when I try to get that interval in Java, I get this message "No class found for interval". I already asked at JFreeReport forum, and there, they told me it is possible a jdbc driver bug, but I'm using the latest jdbc driver for postgreSQL.
They suggested me to cast the interval to a date type, and maybe that would work. But, I don't know if it is possible. I tried :
SELECT date(final_date - initial_date) FROM someTable ; but I received this message: Bad date external representation '00:24'.
Is there a way to cast an interval to a date ? or maybe someone know how to get an interval from a ResultSet from Java.
Thanks for any help.
Pablo Velasquez Rivas
Computer Science Engineer - ITCR