Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Restrict data in IDT to current month only?

Hi Experts,

How can i restrict my data to Current month only. For me Period field is coming as string like '06/2015'.

Pleas help me on this.

Thanks

Tags:
Former Member
replied

Just realized. The operator should be >= and not <=

Also, make sure that the date conversion is working as expected by running the select statement directly against the db table. I doubt because period add returns full date and you just want month and year. you can give a try with the below filter:

DATE_FORMAT(STR_TO_DATE(MOL_OBJECTIVE_KPI_VIEW.period,'%m/%Y'),'%Y%m')>=DATE_FORMAT(PERIOD_ADD(now(),-6),'%Y%m')

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question