hi,
I need to check wthether the Effective date is in between the Start date and end date cloumn. here is the example.
Eff date Start Date End date
20091231 20081231 20111231
20071231 20081231 20111231
For the above records, i need to pick up the first record as Eff date is beetween the start date and End date. my source is file . how check the range ttrougt the transformer stage.
Thanks in Advance
Date Range Validation
Moderators: chulett, rschirm, roy
Date Range Validation
thanks n regards
nani
nani
Since your date format is YYYYMMDD you can use straightforward string/numeric checks for values greater than a less than, i.e.
Code: Select all
IF In.EffDate > In.StartDate AND In.EffDate < In.EndDate THEN 'Good' ELSE 'Bad'
Last edited by ArndW on Thu Apr 01, 2010 7:34 am, edited 1 time in total.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
When you generate test data, you need to construct expected results which you compare with actual results.
Can you please describe the expected results for your two examples?
I suspect Arnd's partial solution will get you most of the way there, but that you require not "Good"/"Bad" as the output but, rather, the beginning date of the period. This is no big deal to change the expression, but I need to be confident that you have fully specified the requirement.
Otherwise all that typing has been a waste of time.
Can you please describe the expected results for your two examples?
I suspect Arnd's partial solution will get you most of the way there, but that you require not "Good"/"Bad" as the output but, rather, the beginning date of the period. This is no big deal to change the expression, but I need to be confident that you have fully specified the requirement.
Otherwise all that typing has been a waste of 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.