on 12-04-2014 12:33 PM
Hi everybody,
I want to create a date, which is 36 month before the date I use right now. To add months to a date I found a function called add_months. https://help.sap.com/saphelp_hanaone/helpdata/en/20/da7b237519101489f3e2e1a284355a/content.htm
I created a calculated column, but I cant use the expression within the editor because the function is not supported. Furthermore, I would need a sub_months function.
Any thoughts how to create a date like that in a calculation view?
Regards, Christoph.
Hi Christoph,
Why dont you just add negative months?
SELECT ADD_MONTHS (TO_DATE ('2009-12-05', 'YYYY-MM-DD'), -24) "add months" FROM DUMMY
Result will be: 5.12.2007
Like this you can add/subtract days, months, weeks, years.
Hope this will help you achieving your goal.
regards
Greg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.