java - how to find the difference in dates stored in 2 columns of mysql of same row -


    dtchkt=obj.next();     string ddf;     rs=st.executequery("select datediff(dtchkt,dtchki) id="+id);     while(rs.next())     {            ddf=rs.getstring(1);         system.out.println(ddf);             } 

the above code not working finding difference between dates of 2 columns want code return no of days between 2 specified dates of column.please suggest possible solution.

rs=st.executequery("select datediff(dtchkt,dtchki) `table_name` id="+id); 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -