oracle 日期处理

来源:互联网 发布:指绘软件 编辑:程序博客网 时间:2024/06/06 20:03


查询:

select to_char(createdate,'yyyy-mm-dd hh24:mi:ss') from tb;


select * from tab where dtcol between to_date('2012-05-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2012-05-31 00:00:00','yyyy-mm-dd hh24:mi:ss')


插入:

insert into tb(createDate) values(to_date ('2012-05-01 00:00:00' , 'YYYY-MM-DD HH24:MI:SS' ))