The usage of the trunc function is summarized. During this period, the roaming and call data of the previous month will be counted. Use the trunc function. Trunc (datetime [, fmt]); 1. select trunc (datetime, 'yy') from dual; ----------------------------------------------- 2012-1-1 2, www.2cto.com select trunc (datetime, 'mm') from dual; 3, the entire point of the current time. For example, it is 15:27:12. After processing, we can get 2012-9-20 15: 00: 00 select trunc (datetime, 'hh ') from dual; hour 15:27:12, the whole point of the current time. For example, it is. After processing, we can get 2012-9-20 15: 00: 00 select trunc (datetime, 'mi') from dual; ---------------------------------------------- 2012-9-20 15:27:00 5. To get the specified time for tomorrow, for example, 2012-9-21 08: 21: 43 select trunc (sysdate) + 1 + 1/24*8 + 1/(24*60) * 21 + 1/(24*60*60) * 43 from dual; www.2cto.com 08:21:43 explanation: + 1, plus a day + 1/24*8, + 1/24 is plus 1/24 days, that is, an hour, multiplied by 8, that is, 8 hours; + 1/(24*60) * 2days divided by 24*60 minutes; + 1/(24*60*60) * 43