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 sql in mysql? : Sql dba

560


What is trigger in pl sql?

549


Does sql full backup truncate logs?

520


Does oracle roll back the transaction on an error?

524


How many subqueries can be nested in a statement?

495






What is before and after trigger?

509


Is left join faster than join?

532


How do you create a unique index?

559


what is the command line end user interface - mysql? : Sql dba

494


What is java sql drivermanager?

539


Do stored procedures prevent sql injection?

538


What is difference between my sql and sql?

521


Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)

528


Is sql a backend language?

608


What is nvl?

603