Page 1 of 1

Months Calculations

Posted: Fri Aug 24, 2007 12:10 am
by baglasumit21
I want to get the rows having date created greater than 1st day of (todays date - 6 months ) as below

Todays Date - 24-Aug-2007
Then i want the rows from [1st day of (24-aug-2007 - 6 months = 24-feb-2007)] i.e 01-feb-2007

I have some manipualtions ans look-ups so i cannot implement this logic in database through query. I want this to be done in Constraints of transformer.
Thanks in Advance

Re: Months Calculations

Posted: Fri Aug 24, 2007 1:03 am
by sachin1
Please search for forum, their is some custom routine developed by Ray.

Posted: Fri Aug 24, 2007 5:24 am
by JoshGeorge
I have posted a solution [url = http://dsxchange.com/viewtopic.php?t=11 ... d7ae4b4bf7] HERE [/url] which should serve your purpose.

For number of months to be reduced pass appropriate value (As per above example - INPUT.No_Of_Months - 6) also make sure you are getting the right value for this stage vairiable

Newyr (int) - - > (If (INPUT.curr_date[6,2] <= mnths) Then
INPUT.curr_date[1,4] - 1 Else INPUT.curr_date[1,4]) - yrs