0

How to calculate workdays_between function for begin date and end date of a table in SAP HANA?

  • Do I understand correctly that the function should return amount of weekdays? What have you tried? – Rufi Nov 07 '17 at 09:52

1 Answers1

0

The usage of workdays_between is as follows:

select
    WORKDAYS_BETWEEN('01', '2017-11-01', '2017-11-30' , 'SAPABAP1') as number_of_workdays 
from dummy; 

If you have date ranges stored in a database table, then you can use following query as sample

select
    WORKDAYS_BETWEEN('01', date_begin, date_end, 'SAPABAP1') as number_of_workdays 
from date_ranges; 

Please note that here the schema name SAPABAP1 is where the TFACS table is created

I hope it helps

Eralper
  • 6,461
  • 2
  • 21
  • 27