And if you want the fractions of a second, the last 4 bytes are the number of
nano seconds expressed in hex.
SQL> select to_number('0C1988C0','XXXXXXXX') from dual;
TO_NUMBER('0C1988C0','XXXXXXXX')
--------------------------------
203000000
Regards
Jonathan Lewis
________________________________________
From: Jonathan Lewis <jonathan@xxxxxxxxxxxxxxxxxx>
Sent: 01 April 2020 00:10
To: oracle-l; Petr.Novak@xxxxxxxxxxxx
Subject: Re: SQL_MONITOR , timestamp value
If you're not worried about the fractions of a second and if you're on Oracle
19 (possibly 18 as well):
SQL> alter session set nls_date_format = 'dd-mon-yyyy hh24:mi:ss';
Session altered.
SQL> select dbms_stats.convert_raw_to_date(hextoraw('7877031203192A0C1988C0'))
from dual;
DBMS_STATS.CONVERT_R
--------------------
18-mar-2019 02:24:41
1 row selected.
(If you're on earlier versions there's a procedure to convert_value with an OUT
parameter of type date - so you could wrap the procedure with a function.
Regards
Jonathan Lewis
________________________________________
From: oracle-l-bounce@xxxxxxxxxxxxx <oracle-l-bounce@xxxxxxxxxxxxx> on behalf
of Petr Novak <Petr.Novak@xxxxxxxxxxxx>
Sent: 31 March 2020 21:29
To: oracle-l
Subject: SQL_MONITOR , timestamp value
Hallo,
in v$sql_monitor output are timestamp bind values:
Binds
========================================================================
| Name | Position | Type | Value |
========================================================================
| :1 | 1 | RAW(32) | f2341da4276d8046a38288d45167661c |
| :2 | 2 | TIMESTAMP | 7877031203192A0C1988C0 |
| :3 | 3 | TIMESTAMP | 7878031E05372E14810600 |
| :4 | 4 | NUMBER | 1 |
========================================================================
How to convert timestamps to readable format ?
Best Regards,
Petr
--
//www.freelists.org/webpage/oracle-l
--
//www.freelists.org/webpage/oracle-l