Support Questions

Find answers, ask questions, and share your expertise

Business Days in Hive

avatar
Rising Star

Hi,

I want to calculate no. of business days between two dates using hive queries. How can I do it??

Thanks

Mamta

1 ACCEPTED SOLUTION

avatar
Master Mentor
3 REPLIES 3

avatar
Master Mentor

@Mamta Chawla

you need to come up with your own logic based on https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-DateFunctions

look at datediff function and then just figure out whether it's a business day, you can also write your own UDF. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+UDF#LanguageManualUDF-CreatingCustom...

avatar
Master Mentor

avatar
Master Mentor