How to display date and time in query output

By default, when you query a date column, oracle will only display dates and not time. Below query enables Oracle to display both date and time for a particular session

sql">alter session set nls_date_format='dd-Mon-yyyy hh:mi:sspm';

Note – this is only session level query.

READ ALSO
How to delete files older than X days in Linux

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.