Monday, September 30, 2013

Cast Function




           Cast is to convert data type.

For e.g:
create table a as
Select CAST(hire_date AS CHAR(40))"H_DATE" FROM employees;

select * from a;

DATE_TIME_DISPLAY_FORMAT = "yyyy/mm/dd hh:mi:ss" ;
DATE_DISPLAY_FORMAT = "yyyy/mm/dd" ;
           TIME_DISPLAY_FORMAT = "hh:mi:ss" ;

No comments:

Post a Comment