on 04-14-2016 2:51 PM
Hello all,
I am stuck with the situation here ,
what i need is to calculate the total number of days excluding the Holidays and Weekends in HANA. How can i calculate the same by not adding (excluding) the saturdays and sundays and also the holidays. I am not able to apply the logic here.
How can i achieve that. Need suggestions plz....
Thanks and Regards
Vaibhav
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Which SPS you are using.
1. You can replicate the TFACS(factory cal) replicated in your schema.
2. Use the select as below:
SELECT WORKDAYS_BETWEEN('01', '2014-01-10', '2014-01-09' , 'YOUR_SCHEMA_NAME') FROM DUMMY;
Note: there is no optimal alternative to this solution. So use this.
Regards,
Chadan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have ecc system installed in top of HANA DB you can use : WORKDAYS_BETWEEN
example:
WORKDAYS_BETWEEN(#Calender ID#, #Date 1#, #Date 2#), #Schema# ( As a Default : 'SAPNHP' ) ) AS "DIFF_DAYS"
Documentation:
WORKDAYS_BETWEEN - SAP HANA SQL and System Views Reference - SAP Library
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
74 | |
9 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.