I am trying to define a table with a date as its attribute. The default format for the date in the Oracle SQL Developer is: 'DD-MON-YY'. Instead of using this default date format, I want to display all the dates in my table in the format: 'MM/DD/YY'. Is there any way to customize the date format in Oracle SQL Developer while creating or display the table? Someone said the to_format function might be helpful, but I just can't found any related information online.
Asked
Active
Viewed 134 times
1 Answers
5
It is the NLS settings of the SQL Developer. Not the query itself. Of course you can format the query
TO_CHAR(sysdate, 'MM-DD-YYYY')
you can also change the NLS Settings of the SQL Developer under Tools > Preferences > Database > NLS

Derviş Kayımbaşıoğlu
- 28,492
- 4
- 50
- 72
-
Thanks for these helpful suggestions, the latter one (changing the setting in NLS) 100% works. Also, I found out the 'ALTER SESSION SET NLS_DATE_FORMAT = 'format_you_want' also works in the same way. For the TO_CHAR(sysdate, 'MM-DD-YY') query, I am not sure I got it. Which case will I want to use this query? Can you expand your answer and maybe come up with some simple examples? Thanks so much! – Allegro Sep 23 '20 at 07:51