I need to find how many days have in this month which we can find with today's date
select to_number(to_date('01.02.2011')-to_date('01.01.2011')) from dual;
not this query Have any other queries?
I need to find how many days have in this month which we can find with today's date
select to_number(to_date('01.02.2011')-to_date('01.01.2011')) from dual;
not this query Have any other queries?
?
You can do it with a
trunc(<date>, 'mm')
(which returns the first day of the month) and anadd_months(<date>,1)
which add one month to a particular day. So, in order to find out how many days the month has in which we currently are (i.e.sysdate
), you could go with something like: