Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Implementation method for oracle to get the current time, accurate to milliseconds and specify the exact number of bits

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Oracle to get the current time, accurate to milliseconds can specify the exact number of bits of Hosecond

Select to_char (systimestamp, 'yyyymmdd hh34:mi:ss.ff') from dual;--20120516 1115 5615 40.729083

Select to_char (systimestamp, 'yyyymmdd hh34:mi:ss.ff3') from dual;--20120516 11 Fran 58 Fran 42.755

Desc ct_cdr_comparison

Name null value type

DATTCDRCOMPARISONGUID NOT NULL TIMESTAMP (9)

VC2CUSTOMER VARCHAR2 (200)

VC2M800 VARCHAR2 (200)

NUMSTATE NUMBER (1)

NUMMARGINCALLTIME_MIN NUMBER (10)

NUMMARGINCBEGIN_MIN NUMBER (10)

NUMCDR_COMPARISONDETAILGUID NUMBER (10)

DATCREATEADATE DATE

DATOPERATEDATE DATE

VC2CREATECODE VARCHAR2 (200)

VC2OPERECODE VARCHAR2 (200)

VC2REMARK VARCHAR2 (200)

Select * from ct_cdr_comparison

2012-05-16 13 1715 14.340213000 a m800 0 20 201 2012-05-16 13:17:14 liuwen

2012-05-16 13 Flux 19V 36.659724000 a m800 0 20 20 2 2012-05-16 13:19:36 liuwen

If the result is not displayed: please set the timestamp

Tool = "options = =" Database = = "NLS

Timestamp format: YYYY-MM-DD HH24:MI:SS.FF

Insert into ct_cdr_comparison (dattCDRCOMPARISONGUID, VC2CUSTOMER, VC2M800, NUMSTATE, NUMMARGINCALLTIME_MIN, NUMMARGINCBEGIN_MIN, NUMCDR_COMPARISONDETAILGUID, DATCREATEADATE, vc2createcode) values (systimestamp,'a','m800',0,20,20,2,sysdate,'liuwen')

The above oracle to get the current time, accurate to milliseconds and specify the exact number of digits is the editor to share with you all the content, I hope to give you a reference, but also hope that you support more.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report