--EXTRACT() 函数用于提取日期/时间的单独部分,比如年、月、日、小时、分钟等等。
select sysdate,
extract(year from sysdate),
extract(month from sysdate),
extract(day from sysdate)
from dual s;
SELECT EXTRACT(HOUR FROM TIMESTAMP '2010-01-10 11:12:13'),
EXTRACT(minute FROM TIMESTAMP '2010-01-10 11:12:13'),
EXTRACT(second FROM TIMESTAMP '2010-01-10 11:12:13')
FROM DUAL;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29519108/viewspace-2217011/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29519108/viewspace-2217011/