当前位置:数据库 > Oracle >>

oracle timestamp与字符串转换


oracle timestamp与字符串转换
 
字符串转timestamp:
  www.zzzyk.com  
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
Oracle
MySQL
Access
SQLServer
DB2
Excel
SQLite
SYBASE
Postgres
如果你遇到数据库难题:
请访问www.zzzyk.com 试试
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,