Ok ... i'm posting my code ... coz nothing is to my avail... please some one help me out on this one ...!!!
Value of AttendedTo from database = 2003-10-29 15:15:12
Value of time from database =2003-10-22 12:34:40
ResultSet call_details2 = sel_name2.executeQuery(" SELECT AttendedTo -time )diffdate FROM complaints where callid = '11' ") ;
The difference that is calculated by the query is "7008072"
Then i'm taking this value to a
string as getDate is not working ... it gives an error that cannot parse date ...!!!
String dd = call_details2.getString("diffdate");
My Question is how can i get the difference between the two dates in a format of "yyyy-mm-dd hh:mm:ss"
Please some one help me out on this one..!!!
Thanx in Advance..!!
I have tried to do the above in the following manner but it's not of my requirement ...
Date Attendedto = call_details.getDate("AttendedTo");
Date time - call_details.getDate("time");
The problem with above is that it returns me only the date i.e.2003-10-22 .... but i also want the time ... and i want both the date and time for calculation...!!!
Any and all ideas are welcomed ...