Debugger shows date values in a inconvenient format

Maxmix

Member³
Hi!

During debugging, I always observe datetime variables in a strange format, something like 3-AUG-17
I'd rather watch its exact value, 03.08.2017 10:01:24

Additionally, could you explain, why we see the full datetime value in Command Window only when large column title is set (otherwise, truncated to 03.08.2017):

Code:
very very long column
---------------------
03.08.2017 10:01:24

(I'm still on 11.0.6. Sorry if it doesn't apply to v12)
 
The date (and time) value is displayed in the nls_date_format. This is an unfortunate Oracle Server behavior, the debugger doesn't even know that the variable is a date. However, if you want to test procedure xyz and display date variables with time fraction, you can simply modify your test script like this:

Code:
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''');
  -- Run the procedure
  xyz(p1 => :p1, p2 => :p2);
end;

In the Command Window date fields have a default width that only shows the date part. Use the SET DATEWIDTH command to make de width large enough to show the time fraction as well.
 
Last edited:
Back
Top