1. 程式人生 > >oracle中的sql語句中timestamp與字串轉換

oracle中的sql語句中timestamp與字串轉換

字串轉timestamp: update tb_a t set t.upd_timestamp=to_timestamp('2012-12-12 12:12:12.0','yyyy-mm-dd hh24:mi:ss.ff')  where t.id='1' timestamp轉字串: select to_char(t.upd_timestamp,'yyyy-mm-dd HH24:mi:ss:ff') from tb_a t 隨便舉個例子僅供參考 select * from Tfprecekweprcdtable where to_char(findfaulttime,'yyyy-mm-dd HH24')='2015-07-17 10';