How do I Change NLS Date Format in Toad ?
Just like we said previously, NLS_DATE_FORMAT can be set at session, database or OS level. It depends on what you want to do.
GUI tools like Toad for Oracle usually override NLS_DATE_FORMAT at any level once you connected to the database in it.
Since Toad for Oracle has 2 types of output, one is script output, the other is data grid. We have to customize NLS_DATE_FORMAT separately.
We may change NLS_DATE_FORMAT at session time for script output.
Let's see the current format before changing it.
Alter Session Set NLS_DATE_FORMAT
We execute ALTER SESSION SET NLS_DATE_FORMAT statement in SQL editor to change it, just like we said in NLS_DATE_FORMAT, How and Why, as simple as that.
To set NLS_DATE_FORMAT in data grid, we need to change it in the "Toad Options" of the tool.
Here we navigate the function menu to "Toad Options".
Date Time Format
We go for "Data Grids" -> "Data" and select ... next to "Date format".
We choose the date format we want.
We choose the time format we want from the drop-down menu.
Please click on "Apply" button to make it take effect immediately.
After you apply and close the windows, the new datetime format takes effect immediately, so you don't have to logout / login.
Let's check the result.
We have customized NLS_DATE_FORMAT in data grid permanently.