SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') currentdate from dual;CURRENTDATE ------------------- 2006-02-23 23:09:57 ---------------------------------------------- TO_CHAR ( date [, fmt [, 'nlsparam' ]] )The 'nlsparams' specifies the language in which month and day names and abbreviations are returned. This argument can have this form: 'NLS_DATE_LANGUAGE = language'
select to_char(In_date,'YYYYMMDD') as 日期,to_char(In_date,'HH24:MI:SS') as 时间 from attend;
用TO_CHAR来做 像楼上的那样。
select to_char(In_date,'YYYYMMDD') as 日期,to_char(In_date,'HH24:MI:SS') as 时间 from attend;
-------------------
2006-02-23 23:09:57
----------------------------------------------
TO_CHAR ( date [, fmt [, 'nlsparam' ]] )The 'nlsparams' specifies the language in which month and day names and abbreviations are returned. This argument can have this form:
'NLS_DATE_LANGUAGE = language'
from attend;
像楼上的那样。
from attend;