Hi all,
I need Add/Subtract N months (say 6 months) to Input date.
I want to do it using DS Functions rather than SQL.
Input date format: YYYY-MM-DD
Output date format: YYYY-MM-DD
This is what i have tried
1) DateFromDaysSince(-1, stringtodate(right(0:MonthFromDate(DSLink4.Datee),2):'-':'01':'-': YearFromDate(DSLink4.Datee),"%mm-%dd-%yyyy"))
But its for subtracting Days rather than Months.
2) I have seen few SQL options.
3) I have saw that in V8.5, Below function may work which is not in V8.1.
So i could not use
DateOffsetByComponents(%basedate%,%yearoffset%,%monthoffset%,%dayoffset%)
Could you please let me know the solution.
Add/Subtract N months from Input date YYYY-MM-DD
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 18
- Joined: Sat Nov 06, 2010 3:35 am
Add/Subtract N months from Input date YYYY-MM-DD
Thanks,
Mouli
Mouli