How do you bring back the last calendar date of the next two months
Summary:
Hi I've been asked to create a report where I list leavers in the next two months and I managed to find a report that shows leavers in the previous month to tweak.
Content (required):
How do I tweak the below code to bring back leavers due to leave in the next two months?
Version (include the version you are using, if applicable):
Code Snippet (add any code snippets that support your topic, if applicable):
Leavers in the previous month
CAST("Worker"."Termination Date" AS DATE)
BETWEEN
TIMESTAMPADD(SQL_TSI_MONTH, -1, TIMESTAMPADD( SQL_TSI_DAY , DAYOFMONTH( CURRENT_DATE) * -(1) + 1, CURRENT_DATE)) /* brings back first calendar date of previous month */
Tagged:
0