当前日:select TRUNC(SYSDATE)  from dual;

  前一天: select TRUNC(SYSDATE - 1)   from dual;

前一天转换为日期格式: select to_char(TRUNC(sysdate-1),'fmdd')   from dual;

to_char(TRUNC(sysdate-1),'fmdd')

  前一个月日期: select add_months(trunc(sysdate),-1) from dual;

 前一个月:select TRUNC(add_months(trunc(sysdate),-1),'MM') from dual;

后一个月转换为字符串:select to_char(add_months(trunc(sysdate),1),'yyyymm') from dual;  

相关文章:

  • 2022-12-23
  • 2021-11-29
  • 2021-11-15
  • 2022-12-23
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
  • 2021-11-29
相关资源
相似解决方案