HI ,
How to get a date filter to select last month 16th date
Thanks,
I managed to get this
([billing_document_date] between _first_of_month(current_date) and _add_days (_first_of_month( current_date) ,15))
Else
([billing_document_date] between _add_days (_first_of_month( _add_months( current_date, -1 )) ,15) and _last_of_month( _add_months( current_date, -1 )) )
but i wanted to add a if in the filter saying if todays date is 1 then do if part or do else part and report will be scehuled to run on 1 st and 16th of the month , so on 1 st it would give prior month 16 to last date of the month and on 16th of the month it would filter on 1 to 15 th .
If I use something like
if(extract(day,current_date)=1)
Then
([billing_document_date] between _first_of_month(current_date) and _add_days (_first_of_month( current_date) ,15))
Else
([billing_document_date] between _add_days (_first_of_month( _add_months( current_date, -1 )) ,15) and _last_of_month( _add_months( current_date, -1 )) )
I am getting error like the filter to valuate to boolean.
I got this ,just learned for relationla filters i cannot use if else on filter and has to be
(extract(day,current_date)<>1 and ([billing_document_date] between _first_of_month(current_date) and _add_days (_first_of_month( current_date) ,14)))
or
(extract(day,current_date)=1 and ([billing_document_date] between _add_days (_first_of_month( _add_months( current_date, -1 )) ,15) and _last_of_month( _add_months( current_date, -1 )) ))
Thanks