0
votes

The date format in Oracle SQL Developer looks like DD-MON-YY.

For example 17-OCT-03.

The date format in APEX looks like MM/DD/YYYY.

For example 12/17/1980.

Why are they different?

This might cause the same SQL query not to work on both applications.

I know that I can avoid such problem by using TO_DATE and TO_CHAR functions but I want to understand the logic behind this problem.

Does every application use its own default date format?

1

1 Answers

1
votes

Yes, every application has it's own date format.

And even every application can have more than one session, each with a different session format specified for DATEs and TIMESTAMPs.

SQL Developer has it's application level settings defined in the Preferences, Database, NLS page. This is how DATEs will appear unless you issue an ALTER SESSION SET... in your SQL Worksheet.

Or, if you always want a specific format regardless of this setting, build it into your query.

select to_char(sysdate, 'DAY') today from dual;

enter image description here