开发者

Informix timestamps in Oracle (via ODBC)

开发者 https://www.devze.com 2022-12-08 05:31 出处:网络
I nee开发者_高级运维d to select some values from an Informix database via Oracle ODBC. One of the columns is a timestamp, and when I just select it all I see in SQL*Plus is the date value. How do I ge

I nee开发者_高级运维d to select some values from an Informix database via Oracle ODBC. One of the columns is a timestamp, and when I just select it all I see in SQL*Plus is the date value. How do I get the time as well?


By default SQL*Plus will display the date in the format specified by the NLS_DATE_FORMAT system parameter (client side). You can alter this behaviour by setting the NLS_DATE_FORMAT appropriately. You can also explicitly display the time data:

SQL> select sysdate from dual;

SYSDATE
-----------
05/10/2009

SQL> select to_char(sysdate, 'hh24:mi') from dual;

TO_CHAR(SYSDATE,'HH24:MI')
--------------------------
13:55
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号