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 an external table?

0 Answers  


Hi Masters, in Oracle Applications 11i, we hace 2 functions using the same form, i need to create 1 personalization, but that code must afect only one function.... how can i do that?

0 Answers  


The table has 3 columns 4 rows. The output is which column has least null values( A COL SHOULD BE THE OUTPUT) Write the query plz. A B C ================ 1 NULL 2 NULL 3 4 NULL 5 6 7 NULL NULL O/P C = 2 4 6

2 Answers   TCS,


What is Trace File ?

4 Answers   Thermotech,


How to define a data source name (dsn) in odbc manager?

0 Answers  






Explain the importance of .pll extension in oracle?

0 Answers  


Can a property clause itself be based on a property clause ?

1 Answers   Oracle,


Which is better Oracle or MS SQL? Why?

2 Answers   Bally Technologies,


How to select the name of employee who is getting maximum sal with out using subquery

15 Answers  


Write a trigger example in oracle?

0 Answers  


What is SGA ? How it is different from Ver 6.0 and Ver 7.0 ?

1 Answers   TCS,


How to recover a dropped index?

1 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)