Transformation help required in Transformer
Moderators: chulett, rschirm, roy
Transformation help required in Transformer
Hi,
i need below transformation help in transformer
LAST_DAY(Current_Date - 1 MONTH)
please help me on this.
i need below transformation help in transformer
LAST_DAY(Current_Date - 1 MONTH)
please help me on this.
SUKH
That's pretty straight forward these days with a couple of parallel transform functions: one to subtract a month and another to get the number of days in a month.
What I don't remember though... in what version was the DaysInMonth function added? It's relatively new and I don't remember if it existed in version 9.
Mike
What I don't remember though... in what version was the DaysInMonth function added? It's relatively new and I don't remember if it existed in version 9.
Mike
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Last day of previous month is a one day (-1 day) offset from the first day of the current month.
Therefore the easiest solution is to build the first day of the current month by subtracting the current day number in the month from the current date.
Functions are DateFromDaysSince() and MonthDayFromDate(). The rest is simple arithmetic.
Therefore the easiest solution is to build the first day of the current month by subtracting the current day number in the month from the current date.
Functions are DateFromDaysSince() and MonthDayFromDate(). The rest is simple arithmetic.
Last edited by ray.wurlod on Wed Apr 13, 2016 5:10 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I provided you with the needed functions - please experiment with these as a learning experience.
I prefer to teach you to fish rather than to give you a fish.
If I give you a fish that's consulting, and you pay for my time.
I prefer to teach you to fish rather than to give you a fish.
If I give you a fish that's consulting, and you pay for my time.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.