Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

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