Question: How to get next 10Yrs 1st Day.
Answer:
select level,TO_CHAR(last_day(add_months(trunc(sysdate), level - 1)) + 1,'DD-MON-YYYY') ,
to_char(last_day(add_months(trunc(sysdate), level - 1)) + 1, 'DAY')
from dual
connect by level <= 120;
select level,
TO_CHAR(add_months(trunc(sysdate, 'MONTH'), level),'DD-MON-YYYY'),
to_char(add_months(trunc(sysdate, 'MONTH'), level), 'DAY')
from dual
connect by level <= 120;
I hope you all have enjoyed reading this article. Comments are welcome....
Answer:
select level,TO_CHAR(last_day(add_months(trunc(sysdate), level - 1)) + 1,'DD-MON-YYYY') ,
to_char(last_day(add_months(trunc(sysdate), level - 1)) + 1, 'DAY')
from dual
connect by level <= 120;
select level,
TO_CHAR(add_months(trunc(sysdate, 'MONTH'), level),'DD-MON-YYYY'),
to_char(add_months(trunc(sysdate, 'MONTH'), level), 'DAY')
from dual
connect by level <= 120;
I hope you all have enjoyed reading this article. Comments are welcome....
No comments:
Post a Comment