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

Which sql most popular?

556


Is sql considered coding?

569


How do I run sql profiler?

588


Why do we create views in sql?

560


What is union and union all keyword in sql and what are their differences?

577






What is the difference between row level and statement level trigger?

521


What is t-sql? : Transact sql

542


What is dialect in sql?

527


How can we implement rollback or commit statement in a trigger?

580


what is difference between delete and truncate commands? : Sql dba

578


Can a select statement fire a trigger?

660


What is trigger types in sql?

535


What are pl/sql packages?

573


What is identity column in sql server?

530


Is sql harder than python?

612