求助日期截取问题,如何从系统时间中截取日的没有前缀0?如2号要获得2,而不是02,在线等~
求助日期截取问题,如何从系统时间中截取日的没有前缀0?如2号要获得2,而不是02   
 请解答下,谢谢~~   
 有了答案立即结贴
------解决方案--------------------写错了 
 select to_number(to_char(sysdate,  'DD ')) from dual;
------解决方案--------------------加入ORACLE群吧!群号是:19312711 
------解决方案--------------------照搬楼上的 
 select to_char(to_number(to_char(sysdate,  'DD '))) from dual; 
------解决方案--------------------Select   Case when substr(to_char(Sysdate, 'yyyymmdd '),7,2)   <10 Then substr(to_char(Sysdate, 'yyyymmdd '),8,1) 
               When substr(to_char(Sysdate, 'yyyymmdd '),7,2)  > 10 Then substr(to_char(Sysdate, 'yyyymmdd '),7,2) 
               End 
   From dual 
 试试这个。日期也有两位数的