COLLECTTIME
1262275200
1262275200
如何将以上Oracle中的时间转化为YYYY-MM-DD HH:MM,以上的时间是二进制表示,还是什么?非常感谢

解决方案 »

  1.   

    SQL> select to_date('1970-01-01 00:00:00','YYYY-MM-DD HH24:mi:ss')+1262275200/24/60/60 from dual;TO_DATE('1
    ----------
    31-12月-09SQL> select to_char(to_date('1970-01-01 00:00:00','YYYY-MM-DD HH24:mi:ss')+1262275200/24/60/60,'yyyy-mm-dd hh24:mi:ss') from dual;TO_CHAR(TO_DATE('1970-01-0100:00:00','
    --------------------------------------
    2009-12-31 16:00:00
      

  2.   

    去java里面用date类把他给New出来public Date(long date)
    Constructs a Date object using the given milliseconds time value. If the given milliseconds value contains time information, the driver will set the time components to the time in the default time zone (the time zone of the Java virtual machine running the application) that corresponds to zero GMT