what is the difference between to_char and to_date
functions?

Answer Posted / sanjukata

to_char()is required to convert number type and date type
of value to character type.

try this
select ename,hiredate,to_char(hiredate,'day ddth mon yy')
from emp;

to_date()is required to convert charater type of value to
date type.
try this
select to_date('22092010','dd-mm-yy')from dual;

Is This Answer Correct ?    15 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is pl/sql table? Why is it used?

728


What are expressions?

746


What are the constraints available in sql?

772


Is a view faster than a stored procedure?

710


Can a foreign key be null?

804






How do I start pl sql?

660


What does the argument [or replace] do?

799


What is fmtonly in sql?

718


Can a commit statement be executed as part of a trigger?

791


How to create your own reports in sql developer?

721


what are the differences among rownum, rank and dense_rank? : Sql dba

730


Why is partition used in sql?

776


how can we take a backup of a mysql table and how can we restore it. ? : Sql dba

710


what is try_catch block in procedure

1383


How does stored procedure reduce network traffic?

729