79565901

Date: 2025-04-10 06:51:02
Score: 1.5
Natty:
Report link

I wrote a UDF that does this for you and mimics Excel networkdays.

https://github.com/DataToolsPro/SnowUDFExcel

Ends up looking like the following. The third argument that is NULL is a holidays array. You can

I wrapped the UDF in a condition to checks if it is >2.

SELECT
IFF (
NETWORKDAYS("Date1" , "Date2" , NULL) as DAYS FROM > 2 , 'Grater than 2', 'Less or equal to 2') AS DAYCOMPARE
FROM
DB_NAME.SCHEMA_NAME.TABLE_NAME;

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Ryan Goodman