our internal code is like this :
WHERE FIELD_HISTORY.MODIFY_DATE >= TO_DATE('#SrcBegDt#', 'yyyy-mm-dd hh24:mi:ss') and FIELD_HISTORY.MODIFY_DATE < TO_DATE('#SrcEndDt#', 'yyyy-mm-dd hh24:mi:ss')
with the #SrcBegDt# and #SrcEndDt# parameters linked to our param in file and processed against our run ctl table for begin date.
but we have the need now for something that would be automated in data stage to extract previous month's data only.
I did something like this in Oracle function 5 years ago - but it's a distant memory - was very tedious as I remember. It took in leap years, etc.
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
thanks ahead of time :D