现在的位置: 首页 > 综合 > 正文

oracle timestamp

2013年02月02日 ⁄ 综合 ⁄ 共 510字 ⁄ 字号 评论关闭
--timestamp
select to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss') current_date,
       (sysdate - 8 / 24 - to_date('1970-01-01', 'yyyy-mm-dd')) * 86400000 current_milli
  from dual;
  
--timestamp from the special day
select to_number(to_date('2011-2-20','yyyy-mm-dd') - to_date('1970-01-01 8:0:0', 'yyyy-mm-dd hh24:mi:ss')) * 24*60*60*1000 from dual;

--
1. to_date('2010-12-01', 'yyyy-mm-dd');
2. to_char(sysdate, 'yyyy-mm-dd hh24:mi:ss');
3. trunc(sysdate);
4. where createtime < to_date('2010-12-01', 'yyyy-mm-dd') and createtime >=  to_date('2010-11-30', 'yyyy-mm-dd');
   

【上篇】
【下篇】

抱歉!评论已关闭.