我觉得,你说的这个问题, 其实就是对那个时间字段的值如何进行格式转换,
从而在查询条件或显示时达到限定在小时.  就是利用 to_char ,或  to_date 这两个ORACLE带的数据呗.
  
 还有你说的那个"一天前"之类的时间表示,查一下ORACLE的有关日期函数,
 就能找到答案的.  大家手上可能没有现成的资料. 
 还不如自己去查些资料呢, 其实就拣 ORACLE的日期函数和 to_date, to_char 
 看就行了.

解决方案 »

  1.   

    一小时
    1/24
    一分钟
    1/(24*60)
    一秒钟
    1/(24*60*60)
    那么系统前16小时是
    sysdate-16/24即sysdate-2/3
      

  2.   

    SQL> select sbtime from records where rownum=1;SBTIME
    ----------
    21-11月-02
    SQL> select to_char(sbtime,'yyyy')||'.'||to_char(sbtime,'mm')||'.'||to_char(sbtime,'dd') sb from rec
    ords where rownum<=1;SB
    ----------
    2002.11.21然后<=%rs(sb)%>
      

  3.   

    select trunc(结束时间,'hh24')-trunc(开始时间,'hh24') hh from test;--------
    <%
      if rs("hh")>=1 then 
      sql="inset into.........."
      ........
    %>