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!

how to convert HH12:MI AM into HH24:MI:SS

ChakravarthyDBAApr 26 2013 — edited Apr 27 2013
CREATE TABLE SHIFTS (SHIFTCODE VARCHAR2(10),SHIFTTIME VARCHAR2(20));

INSERT INTO SHIFTS VALUES ('EG','06:00 AM');
INSERT INTO SHIFTS VALUES ('GA','01:00 PM');
INSERT INTO SHIFTS VALUES ('GE','05:00 PM');

Now I want to get the shift time as 06:00:00,13:00:00 and 17:00:00

I have tried like this select to_char(shifttime,'HH24:MI:SS') FROM SHIFTS;
But I am getting error invalid number

Please help me
This post has been answered by sb92075 on Apr 27 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 25 2013
Added on Apr 26 2013
7 comments
2,998 views