SQL Developer – Date Format


You are on SQL Developer and have a date-time column, you run a query and it only displays the date. You could do a “to_char(mydatefield,’MM/DD/YYYY hh24:mi:ss’) ” but then you will have to do it for ALL date fields and change all your saved queries.

You wish there was something in SQL-Developer that would apply this globally. Well there is, goto Tools->Preferences -> NLS

Now you have to set the Date Format on the right ….so what is it? “DD-MON-RR”  or “DD-MON-RRRR” or  “DD-MON-RR HH24.MI.SSXFF AM” or something more obscure to display your dates with times on them?

It turns out,  you can use anything as long as you specify the right time format “DD-MON-RR HH.MI.SSXFF AM” or “DD-MON-RR HH.MI.SS AM” or “MM/DD/RRRR HH.MI.SS AM” as shown above.

Published by

techiecook

I apply my degree in computing with my experience in building networked software to create products that people will love. More about me here https://techiecook.com/about/

4 Comments

Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s