java - Losing time part while updating date column using JDBC . How can we preserve it? -
java - Losing time part while updating date column using JDBC . How can we preserve it? -
i have tried below code after update date updated in db without time passed . time update 00:00:00 . how can update time in oracle date coluumn .
i have tried utilize preparedstatement.setdate,preparedstatement.settime tried datecolumn=to_date('nov 6, 2014 12:30:00 am', 'mon dd, yyyy hh:mi:ss am') still time part lost . date update in db "nov 6, 2014 12:00:00 am"
calendar startdatetime=calendar.getinstance(); timestamp t=new timestamp(startdatetime.gettimeinmillis()); preparedstatement preparedstatement = connection.preparestatement(updatequery); preparedstatement.settimestamp(1, t); system.out.println("update date "+startdatetime.gettime().tolocalestring()); preparedstatement.executeupdate();
update query : update table_bpm_step_inst set wait_time=? objid='abc'
java oracle date jdbc
Comments
Post a Comment