將timestamp型別轉換為date型別

jane_pop發表於2015-11-29
SQL> select systimestamp from dual;

SYSTIMESTAMP
--------------------------------------------------------------------------------
21-OCT-15 09.57.06.491638 AM +08:00

SQL> select systimestamp+0 from dual;                    --oracle會自動進行隱式轉換

SYSTIMESTAMP+0
--------------
2015-10-21 9:5

SQL> select cast(systimestamp as date) from dual;

CAST(SYSTIMESTAMPASDATE)
------------------------
2015-10-21 9:57:28

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29800581/viewspace-1849242/,如需轉載,請註明出處,否則將追究法律責任。

相關文章