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!

to_char output as AM/PM

367852Jul 24 2006 — edited Jul 24 2006
How do I get the output as 24-JUL-2006 05:26:02 PM using to_char ?

select
sysdate,
TO_CHAR (SYSDATE, 'dd-MON-yyyy hh12:mi:ss'),
TO_CHAR (SYSDATE, 'dd-MON-yyyy hh24:mi:ss') from dual

output:
--------------------------------
24-JUL-06
24-JUL-2006 05:26:02
24-JUL-2006 17:26:02
--------------------------------
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2006
Added on Jul 24 2006
1 comment
5,044 views