Home > Mobile >  How get last date in month
How get last date in month

Time:10-08

I have parameter YEAR and MONTH, for example 2021 and 9

How do I get the last date of that month, in that year?

For example, with the values mentioned before, I should receive:

30.09.2021.

CodePudding user response:

Why not literraly ?

select LAST_DAY(SYSDATE) from dual

with your parameters

select LAST_DAY(to_date('01'||:month||:year,'ddmmyyyy')) from dual;
  • Related