Print Thread
How to see time portion of date variable in debugger?
#64542 04/10/23 11:39 AM
Joined: Aug 2013
Posts: 32
A
akaya Offline OP
Member
OP Offline
Member
A
Joined: Aug 2013
Posts: 32
Hi,

When using debugger, I can only see the date portion of the variable. How can I see time portion of the variable?

Thank you.

Sample test window:

declare
v_date date:=sysdate;
begin
dbms_output.put_line(v_date);
end;

Attached Files
debugger2.JPG (7.03 KB, 18 downloads)
Last edited by akaya; 04/10/23 11:46 AM.
Re: How to see time portion of date variable in debugger?
akaya #64544 04/10/23 12:52 PM
Joined: Aug 1999
Posts: 22,218
Member
Offline
Member
Joined: Aug 1999
Posts: 22,218
The date and time value is displayed in the nls_date_format. If you want to display date variables with time fraction, you can simply modify your test script like this:

Code
declare
  v_date date:=sysdate;
begin
  -- Modify the nls_date_format for the session of the test script
  dbms_session.set_nls('nls_date_format','''DD-MM-YYYY HH24:MI:SS''');
  -- From here on dates are displayed with time fraction
  dbms_output.put_line(v_date);
end;


Marco Kalter
Allround Automations
Re: How to see time portion of date variable in debugger?
akaya #64545 04/10/23 01:17 PM
Joined: Aug 2013
Posts: 32
A
akaya Offline OP
Member
OP Offline
Member
A
Joined: Aug 2013
Posts: 32
This works, thank you.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.034s Queries: 16 (0.009s) Memory: 2.5038 MB (Peak: 3.0408 MB) Data Comp: Off Server Time: 2024-05-15 00:47:58 UTC
Valid HTML 5 and Valid CSS