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!

I want to reset my date to this format: 12/31/2012 11:59:59 PM .. please ad

979256Dec 22 2012 — edited Dec 24 2012
I want to reset my date to this format: 12/31/2012 11:59:59 PM - see code below:

DECLARE
v_latest_close DATE;
BEGIN
v_latest_close := TO_DATE ('12/31/2012 23:59:59 ','MM/DD/YYYY HH24:MI:SS');

DBMS_OUTPUT.PUT_LINE('The new date format is : '|| v_latest_close);

END;

the code above displays only : 12/31/2012 instead of 12/31/2012 11:59:59 PM

Please advise

Hope
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 21 2013
Added on Dec 22 2012
4 comments
598 views