Tuesday, March 23, 2021

Oracle Date Function

select to_char(add_months(to_date((26||'-'||substr('&W2021M02',7,2)||'-'||substr('&W2021M02',2,4)),'DD-MM-RRRR'),-1),'DD-MON-RRRR') 

,to_char(to_date((25||'-'||substr('&W2021M02',7,2)||'-'||substr('&W2021M02',2,4)),'DD-MM-RRRR'),'DD-MON-RRRR') from dual;


to_char(to_date(substr('W2021M02',7,2),'MM'),'Month')||'-'||to_char(to_date(substr('W2021M02',2,4),'RRRR'),'RRRR') MMRR

No comments:

Post a Comment

How to install and configure Oracle Apex 24.1 with ORDS 22, Tomcat 9 and Jasper Report 7 on Oracle Linux 8.10

#########################Install Oracle  APEX 24.1################################ ----------------------------------------------------...