How to convert the date format from dd/mm/yyyy to
mm/dd/yyyy. (for eg). 22/05/2008 to 05/22/2008.
when u use to_char(), it tells the month is invalid. how to
resolve this problem.tel with eg.

Answers were Sorted based on User's Feedback



How to convert the date format from dd/mm/yyyy to mm/dd/yyyy. (for eg). 22/05/2008 to 05/22/2008. ..

Answer / prabhu

1* select
to_char(to_date('22/05/2008','dd/mm/yyyy'),'mm/dd/yyyy')
from dual
SQL> /

TO_CHAR(TO
----------
05/22/2008

Is This Answer Correct ?    21 Yes 2 No

How to convert the date format from dd/mm/yyyy to mm/dd/yyyy. (for eg). 22/05/2008 to 05/22/2008. ..

Answer / pinki

again convert in back to date using to_date

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More Oracle General Interview Questions

Difference between an implicit & an explicit cursor.?

2 Answers  


Can multiple cursors being opened at the same time?

0 Answers  


What is the difference between a user and a schema in oracle?

0 Answers  


how many outer joins are used in a single sql query? is there any limitations for using of outer joins?

2 Answers   BOB Technologies, Cap Gemini, IBM,


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

0 Answers  






I have table-A(1,2,3,4,4,5,6,6,6,7). how to get all duplicate values?what is sql query?

5 Answers   Zensar,


Is it possible to split the print reviewer into more than one region ?

0 Answers   Oracle,


Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?

0 Answers  


What is the effect of setting the value "all_rows" for optimizer_goal parameter of the alter session command? What are the factors that affect optimizer in choosing an optimization approach?

0 Answers  


Can we commit inside a function in oracle?

0 Answers  


What are the trigger associated with image items ?

1 Answers   Oracle,


Write a syntax for update query in oracle?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1790)
  • 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)