Re: resultset to date conversion
priyanka.nsk@gmail.com wrote:
I have created 2 tables as workflow and admin in sql.
And i want to subtract date fields from these 2 tables.
the query is :---
select to_char(workflow.created_on-admin.due_on)from workflow,admin
where workflow.taskid=5 and admin.taskid=5;
It is working properly in sql and giving proper results. Result is in
resultset
ResultSet, not resultset.
format.
It's not a format, it's an object.
But i want this result in either string or integer format.
Your query returns it in a string type (not format) already.
I want to execute all this in Java Program.
Do you have any Java code already or are you starting from the very beginning?
I must conclude from your use of the term "ResultSet" that you already have
some Java code written. If you do not, then you do not have a ResultSet.
Can you please tell me..
What tutorials, books or other resources have you tried, and what difficulty
are they presenting you?
Please explain with an example, if possible.
There are myriad explanations and examples on the web. GIYF. Which ones have
you tried, and what difficulty did they present?
Given your query and the ResultSet you say you have, say:
ResultSet rs = query.executeQuery();
you would retrieve the String result of your query with the call
String overdue = rs.getString( 1 );
--
Lew