trunc(d,fmt)
Purpose
TRUNC returns d with the time portion of the day truncated to the unit specified by the format model fmt. If you omit fmt, d is truncated to the nearest day. See Also: "ROUND and TRUNC Date Functions" for the permitted format models to use in fmt Example
SELECT TRUNC(TO_DATE('27-OCT-92','DD-MON-YY'), 'YEAR')
"New Year" FROM DUAL;
New Year
---------
01-JAN-92
Purpose
TRUNC returns d with the time portion of the day truncated to the unit specified by the format model fmt. If you omit fmt, d is truncated to the nearest day. See Also: "ROUND and TRUNC Date Functions" for the permitted format models to use in fmt Example
SELECT TRUNC(TO_DATE('27-OCT-92','DD-MON-YY'), 'YEAR')
"New Year" FROM DUAL;
New Year
---------
01-JAN-92
你说的意思,我明白了!谢谢!
hosia(红霞飞):
谢谢你,通过这个问题的提问,我又学到了turncat(x[,y])用法!