Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Date format - WITHOUT NLS_DATE

ora_1978Dec 5 2017 — edited Mar 29 2018

The nls_date format is MM-DD-YYYY.

We are using to_char in the select statement.

we are trying something like

select TO_DATE(to_char(sysdate,'YYYY-MM-DD'),'YYYY-MM-DD') FROM DUAL;

The above query returns the result:

12-05-2017.

So it is using the nls_date setting.

we have only views in our project. No other oracle objects.

alter session nls_date statement is restricted

without using nls_date how to display the result in YYYY-MM-DD

This post has been answered by Billy Verreynne on Dec 5 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 2 2018
Added on Dec 5 2017
22 comments
1,038 views