This content has been marked as final. Show 3 replies
select sysdate+rownum from dual connect by rownum <31 will give you the dates of the one month.
you can take the above query in cursor and then populate the date in the date listItem
What i meant is that if i selected 1976 as year and march as month the code will populate days in that month of the year but at same point try to change my month to June or other month
the code failed to populate days with corresponding day of the new month selected alone instead it combined the day of previous month selected and new month together
.Except i exit from the form and run it again
1976 as year and march as month
cursor days(v_last_date in date,vnDays in number) is
select first_day(v_last_date)+rownum-1 sdate from dual
connect by rownum<vnDays+1;
select last_day(to_date(monthITEM||yearITEM,'MonthYYYY')) from dual;
// the month is in the monthITEM
// the year is in the yearITEM
// last_day will have the last day of that month.
//now you have to find the no. of days.
select to_char(last_Date,'dd') into nDays from dual;
for dates in days