When running a query with a date datatype column, the time info is not displayed with the date info.
Query not being run with F9.
Query being run with F5 and displaying based of format defined by the database.
SOLUTION 1:
Check that a time format is selected under View | Toad Options | Data Grid | Data, and that it is not set as blank. Run query as F9 "run as statement" to display results with applied Toad option settings.
SOLUTION 2:
Please note queries can be executed by either F5 execute as script, or F9 run as statement. F5 more closely resembles script output and SQL Plus. F9 will apply Toad option settings and F5 will not.
If using F5, the data returned will be based off the Oracle NLS parameters. By default Oracle sets the nls_date_format as DD-MON-YY, without time. If the query needs to be run using F5, the NLS parameter needs to be adjusted to display time also. This can be done either by running an alter session statment in the editor to alter the NLS setting in the database for that session:
SQL> alter session set nls_date_format = 'dd.mm.yyyy hh24:mi:ss';
... or going to Database menu in Toad | Administer | NLS Parameter | Session. From there, double click on the nls_date_format parameter and adjust it for just that session. For this to be editable through Toad, the Toad license registered needs to include DBAdmin module.
In general, the right Oracle permissions are also required in order to alter the database session setting.
If either of these conditions are not met, this setting cannot be changed. In that case, please contact the DBA.
© 2021 Quest Software Inc. ALL RIGHTS RESERVED. Feedback Terms of Use Privacy