Hi I need help on this.
I have a date column in source yyyy-mm-dd. I want to minus three years from this date for my requirement. Is there any function to do this.
ex: 2007-10-10
Minus three years means: 2004-10-10
How to get this.
Please heplp on this.
Thanks
Pawan
How to minus three years from the source date column
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 46
- Joined: Fri Oct 06, 2006 6:36 am
- Location: Tucson
If you datatype is Date you can do a DateFromDaysSince() call, if the datatype is string you can also subract 3 years using a transform function such as The program will do in implicit conversion from string to integer and then back to string.
Code: Select all
In.Column[1,4]-3:In.Column[5,6]
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
Re: How to minus three years from the source date column
dvpawankumar wrote:Hi I need help on this.
I have a date column in source yyyy-mm-dd. I want to minus three years from this date for my requirement. Is there any function to do this.
ex: 2007-10-10
Minus three years means: 2004-10-10
How to get this.
Please heplp on this.
Thanks
Pawan
Hi,
You can you like below.
DateFromDaysSince(-1095, InputColumn).
Regards,
Ram
Actually that number isn't fixed, it depends upon whether or not there is a leap year involved.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>