SQL> select add_time,round (add_time,'yyyy') aa from peng3
2 where rownum<=2;
ADD_TIME AA
----------- -----------
2007-7-27 2 2008-1-1
2007-7-27 2 2008-1-1
SQL> select add_time,round (add_time,'mm') aa from peng3
2 where rownum<=2;
ADD_TIME AA
----------- -----------
2007-7-27 2 2007-8-1
2007-7-27 2 2007-8-1
SQL> select add_time,round (add_time,'dd') aa from peng3
2 where rownum<=2;
ADD_TIME AA
----------- -----------
2007-7-27 2 2007-7-28
2007-7-27 2 2007-7-28
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22934571/viewspace-1043868/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22934571/viewspace-1043868/