how to truncate date and get only time part 9:20:00

Answer Posted / pari

declare
str varchar2(250);
str1 varchar2(250);
begin
select to_char(sysdate,'dd-mm-yyyy hh:mi:ss') into str from
dual;
dbms_output.put_line (str);
str1 := substr(str,instr(str,' ',1)+1 );
dbms_output.put_line (str1);
end;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you find current date and time in oracle?

584


Please explain compound trigger in oracle?

594


what is the need of indexing topic in oracle? where do we use in a Java project? any other option other than using this to get the same result where we use indexing ?

2042


What is the difference between the Oracle ODBC driver and a Microsoft ODBC (Open Database Connectivity) Driver?

606


What is a private synonym?

1077






You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?

1443


What are the uses of synonyms?

599


Explain the use of parfile option in exp command.

518


Can we use oracle pl/sql block in core java? if so how? pls get back to me .....

2502


How to get the Installed Oracle Version Information ?

615


You have found corruption in a tablespace that contains static tables that are part of a database that is in NOARCHIVE log mode. How would you restore the tablespace without losing new data in the other tablespaces?

1452


How do I call oracle stored procedures that take no parameters?

560


What are the system predefined user roles?

583


How to display employee records who gets more salary than the average salary in the department?

590


Her departmandaki isçilerden empno' su ikinci sirada olan isçilerin empno, deptno, hiredate, sira_no bigilerini döndüren sorguyu yaziniz?

1562