![Razz :P](./images/smilies/icon_razz.gif)
Subtracting 2 dates in Transformer
Moderators: chulett, rschirm, roy
Hi,
If you are not frustrated with me till now , well... you will now
because I was making a very silly mistake.
I enclosed the DSLink.Date1 in quotes , I had to put the values as
Iconv(DSLink.Date1[1,10],'DYMD') instead I did
Iconv('DSLink.Date1[1,10]','DYMD') .
I greatly appreciate all your help. Thanks a lot.
Regards
Preethi
If you are not frustrated with me till now , well... you will now
![Wink :wink:](./images/smilies/icon_wink.gif)
I enclosed the DSLink.Date1 in quotes , I had to put the values as
Iconv(DSLink.Date1[1,10],'DYMD') instead I did
Iconv('DSLink.Date1[1,10]','DYMD') .
I greatly appreciate all your help. Thanks a lot.
Regards
Preethi
-
- Premium Member
- Posts: 45
- Joined: Fri Nov 07, 2008 12:22 pm
Subtracting dates in Transformer
Probably most people know this by now, but there's an easier way to subtract dates in transformer (not BASIC transformer.. the one in 8.1.0)
DaysSinceFromDate(CurrentDate(),DSLink21.PROD_DT)
Result = 26
In my example CurrentDate() is 3/26/2009 and DSLink21.PROD_DT = 2/28/2009
(There was actually a function to do this!!! lol..
and I was going through Iconv and Oconv.. and BASIC.. )
Hope this saves time for any other newbie like me![Smile :)](./images/smilies/icon_smile.gif)
Cheers !!
Hiral
DaysSinceFromDate(CurrentDate(),DSLink21.PROD_DT)
Result = 26
In my example CurrentDate() is 3/26/2009 and DSLink21.PROD_DT = 2/28/2009
(There was actually a function to do this!!! lol..
and I was going through Iconv and Oconv.. and BASIC.. )
Hope this saves time for any other newbie like me
![Smile :)](./images/smilies/icon_smile.gif)
Cheers !!
Hiral
Thanks,
Hiral Chauhan
Hiral Chauhan
-
- Premium Member
- Posts: 45
- Joined: Fri Nov 07, 2008 12:22 pm