Oracle provides the TO_CHAR and TO_DATE functions for mutual conversion between the date type and the string type. This function has many available types, which can be divided into numeric Conversion Type (NUMBERFORMATS) and date conversion type (DATEFORMATS) list the hours of a day (01-12) HH24 hours of a day (00-23)
Oracle provides the TO_CHAR and TO_DATE functions for mutual conversion between the DATE type and the string type. This function can be divided into number formats and date formats) list the hours of a day (01-12) HH24 hours of a day (00-23)
Oracle providesTO_CHARAndTO_DATEFunction
This function has a large NUMBER of available FORMATS, which can be divided into number formats and date formats. This function lists common FORMATS of DATE conversion FORMATS.
HH12 hours per day (01-12)
HH24 hours per day (00-23)
MI minutes (00-59)
SS seconds (00-59)
MS ms (000-999)
YYYY Year (full 4-digit year (a.m)
MM Month (01-12)
DD days in January (01-31)
To_char
select to_char(createdate,'yyyy-MM-dd HH24:mi:ss') from biz_project_impl -- 2011-10-26 00:53:14
To_date
insert into biz_project_impl(id,projectname,createdate) values(sys_guid(),'itmyhome',to_date('2012-11-24 11:18:23','yyyy-MM-dd hh24:mi:ss'));