var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: using date function
how can i get the last day of the month using date function. for example the query must return "31 st october" as a result if i give the month and year.
thanks in advance
This is pretty simple and can be done by a simple function called LAST_DAY which accept DATE data-type as a parameter & return as DATE data-type.
Check this out:
select last_day(sysdate) from dual;
Or, for your case as you indicated, it is done like this:
select last_day(to_date('10/2004','mm/yyyy')) "Last Date of Month" from dual;
You can now put your desired format to display the date.
Hope that helps.
And to get "31st of October", you would just:
select to_char( last_day( to_date('10/2004','mm/yyyy') ), 'DDth "of" Month' ) from dual