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

Answers were Sorted based on User's Feedback



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

Answer / sandeep

select to_char(sysdate,'HH24:MM:SS') from dual;

Is This Answer Correct ?    9 Yes 1 No

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

Answer / 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

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

Answer / saisivakumar

select <column_name>,to_char (<column_name>,'fmdd month
yyyy fmhh:MI:ss am') from <table_name> where
condition;

Note: i have given for both date and time, pls use as u
want.

Is This Answer Correct ?    1 Yes 2 No

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

Answer / parna

select to_char(sysdate,'HH24:MM:SS')from dual;

Is This Answer Correct ?    1 Yes 2 No

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

Answer / kumar.t

Select Convert(varchar,getdate(),114) As DateTime

It is Only Run In Sql Server2000

By

Kumar .T

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Oracle General Interview Questions

What is data file?

0 Answers  


which language is used to develop the oracle........?

4 Answers   Infosys,


how to store only time in a data base table

2 Answers  


i must get table name, constraint type, constrain name with using concads "||" and it must be in string type, then with join processes i need code please help immidiately

1 Answers  


How to create a single index for multiple columns?

0 Answers  






State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.

0 Answers   Atos Origin,


Explain alias?

0 Answers  


What is merge statement used for?

0 Answers  


How to check your oracle database 10g xe installation?

0 Answers  


What is proxy method?

0 Answers  


1.What is inline function in oracle and its purpose? 2.What is the equivalent operator for "different from pattern" in oracle? 3. If you define a variable in oracle, how it will be available? [a. Until database shut down b. Until table deleted c. until session get expired]

2 Answers  


What is meant by joins?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)