Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Can I use a SQL Server user defined function in Alteryx

bobbybalan
7 - Meteor

I have a SQL function that calculates the New Date based on Sale Date and number of days (skip days) passed as parameters to the function. I am trying to avoid using this function and trying to recreate the functionality completely in Alteryx. I can use DateTimeAdd to skip days. However, I want to exclude Weekends and Holidays too. Is there a way to do it in Alteryx?

 

For example - I want to skip 1 business day from a Sale Date, and find the New Date. I have to exclude weekends and USPS holidays here, so cannot simple say Sale Date + 1 day. For this example assume 4/2/2021 is a holiday. Below are sample sale dates and new dates that I want to calculate. Can someone please share some ideas? Thanks a bunch!

 

Sale Date: 4/13/2021    New Date: 4/14/2021 (no days excluded)

Sale Date: 4/16/2021    New Date: 4/19/2021 (exclude weekend)

Sale Date: 4/1/2021      New Date : 4/5/2021  (exclude 4/2, 4/3 & 4/4/ due to holiday & weekend)

 

2 REPLIES 2
RishiK
Alteryx
Alteryx
bobbybalan
7 - Meteor

Thanks. However this is above my level...LOL!, but I appreciate your input. I am fairly new to Alteryx.

 

For now I am creating an excel file and joining to the Sale Date to get the New Date. 

Labels