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 with T and N in Oracle 11.2.0.3.0

S567Jul 9 2019 — edited Jul 23 2019

Hi Expert's,

How can i get the below date format with T after date and Z after seconds without manually adding to sql.

I see there is a alter statement which will set nls_date_format to date ending with T and Seconds ending with Z but this is manually altering the the date format.

What i am looking is to achieve through SQL without  manually concatenating T and Z something like below.

select to_char(sysdate,'YYYY-MM-DD')||'T'||to_char(sysdate,'HH:MI:SS')||'Z' END from dual;

Thanks,

Shiva

This post has been answered by Gaz in Oz on Jul 10 2019
Jump to Answer
Comments
Post Details
Added on Jul 9 2019
11 comments
16,826 views