Re: SQL_MONITOR , timestamp value
Date: Tue, 31 Mar 2020 13:40:15 -0700
Message-Id: <13010855-702F-4900-903B-64F6FD66998E_at_gmail.com>
I use this
SET HEA ON LIN 2490 PAGES 100 TAB OFF FEED OFF ECHO OFF VER OFF TRIMS ON TRIM ON TI OFF TIMI OFF LONG 240000 LONGC 2400 NUM 20 SERVEROUT OFF;
PRO
PRO Enter Timstamp as Hexdump
DEF timestamp_as_hexdump = '&1.'
UNDEF 1;
COL time FOR A19;
SELECT TO_CHAR(TO_NUMBER(SUBSTR('&×tamp_as_hexdump.', 1, 2), 'xx') - 100, 'fm00')||
TO_CHAR(TO_NUMBER(SUBSTR('&×tamp_as_hexdump.', 3, 2), 'xx') - 100, 'fm00')|| '-'|| TO_CHAR(TO_NUMBER(SUBSTR('&×tamp_as_hexdump.', 5, 2), 'xx'), 'fm00')|| '-'|| TO_CHAR(TO_NUMBER(SUBSTR('&×tamp_as_hexdump.', 7, 2), 'xx'), 'fm00')|| 'T'|| TO_CHAR(TO_NUMBER(SUBSTR('&×tamp_as_hexdump.', 9, 2), 'xx') - 1, 'fm00')|| ':'|| TO_CHAR(TO_NUMBER(SUBSTR('&×tamp_as_hexdump.', 11, 2), 'xx') - 1, 'fm00')|| ':'|| TO_CHAR(TO_NUMBER(SUBSTR('&×tamp_as_hexdump.', 13, 2), 'xx') - 1, 'fm00') AS time
FROM dual
/
Enter value for 1: 7877031203192A0C1988C0
TIME
2019-03-18T02:24:41
> On Mar 31, 2020, at 13:29, Petr Novak <Petr.Novak_at_trivadis.com> wrote:
>
> 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 Tue Mar 31 2020 - 22:40:15 CEST