Re: SQL_MONITOR , timestamp value
From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 31 Mar 2020 23:10:18 +0000
Message-ID: <LNXP265MB15623D52046522B69291EB5BA5C80_at_LNXP265MB1562.GBRP265.PROD.OUTLOOK.COM>
18-mar-2019 02:24:41
From: oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Petr Novak <Petr.Novak_at_trivadis.com> Sent: 31 March 2020 21:29
To: oracle-l
Subject: SQL_MONITOR , timestamp value
Date: Tue, 31 Mar 2020 23:10:18 +0000
Message-ID: <LNXP265MB15623D52046522B69291EB5BA5C80_at_LNXP265MB1562.GBRP265.PROD.OUTLOOK.COM>
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_at_freelists.org <oracle-l-bounce_at_freelists.org> on behalf of Petr Novak <Petr.Novak_at_trivadis.com> 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
-- http://www.freelists.org/webpage/oracle-l -- http://www.freelists.org/webpage/oracle-lReceived on Wed Apr 01 2020 - 01:10:18 CEST