Hi All,
My requirement says:
my output column should be 1 from Last sunday of March till last sunday of October and other times it will be 0.
How to do this logic in transformer?
Thanks in Advance,
How to find Last sunday of a month
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Calculate the date of the last day of March as Use a similar technique for the last day of October.
Calculate the last Sunday of March asUse a similar technique for the last Sunday of October.
Code: Select all
DateFromComponents(#jpYear#,3,31)
Calculate the last Sunday of March as
Code: Select all
PreviousWeekdayFromDate(svLastDayOfMarch,'Sunday')
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:
-
- Participant
- Posts: 1
- Joined: Fri May 03, 2013 12:16 am
Re: How to find Last sunday of a month
Hi ,
Hope below logic solve your problem
Regards
Kartheek Kumar Kesarla
Hope below logic solve your problem
Code: Select all
If column <= NthWeekdayFromDate(2013-04-01, "SUNDAY",-1) and column >= NthWeekdayFromDate(2013-11-01, "SUNDAY",-1)Then 1 Else 0
Regards
Kartheek Kumar Kesarla
Regards
Kartheek Kumar Kesarla
IT Database Analyst
Kartheek Kumar Kesarla
IT Database Analyst