Wednesday, July 14, 2021

Query to get Date and Day from Given Date

 SELECT TO_CHAR(SYSDATE-TO_CHAR(SYSDATE,'dd')+LEVEL,'DD-Mon-YYYY')"DATE" 

      ,TO_CHAR(SYSDATE-TO_CHAR(SYSDATE,'dd')+LEVEL,'fmDay') "WEEK" 

  FROM dual 

 WHERE TO_CHAR(SYSDATE-TO_CHAR(SYSDATE,'dd')+LEVEL,'fmDAY') = UPPER('&DAY') 

       CONNECT BY LEVEL<=TO_CHAR(LAST_DAY(SYSDATE),'dd');

No comments:

Post a Comment

Query to get the list of contexts for each formula type in Oracle Fusion HCM

select t.base_formula_type_name ,      ttl.formula_type_name ,      ttl.description ,      c.base_context_name from   ff_formula_types_b t ,...