Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

compare given date with current date exclude weekends while comparing

vnn2492
7 - Meteor

I have a requirement where I need to extract errors stayed more than 48 hours on column "Changed on", to calculate 48 hours we need to ignore weekends, so If any of the error occurs over Fridays the error should wait for 48 hours by excluding weekends.

 

Year IDerror  Vaulttype of error Changed On
2020/211221errorsystem error19/10/2021 18:00
2020/212341erroroutput error21/10/2021 11:35
2020/213456errorsystem error22/10/2021 10:20

 

can some one help me with this please ?

 

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @vnn2492 

 

Can you provide some sample input and expected output it will help us get a better understanding of the usecase.

vnn2492
7 - Meteor

Hi @atcodedog05

 

Here is the sample input attached below in the table 

 

Year IDerror  Vaulttype of error Changed On
2020/211221errorsystem error19/10/2021 18:00
2020/212341erroroutput error21/10/2021 11:35
2020/213456errorsystem error22/10/2021 10:20

 

and the expected output would be :
I need a difference between current date to " changed on" from the input table.

if the " type of error " stayed more than 48 hours? have to separate those records. while calculating 48 hours I need to ignore weekends as errors are not handled during weekends.

 

so for example: if any error is occurred on "Friday 22/10/2021" and you are finding difference on 25/10/2021: in this scenario you have to ignore Friday as the error is not yet stayed more than 48 hours 

 

 

Qiu
20 - Arcturus
20 - Arcturus

@vnn2492 

I hope I understand it correctly.

Capture1C.PNG

vnn2492
7 - Meteor

Thank you for your response,

 

here we need to find the difference between the column " changed on" to "current date"

and I need to separate the difference which is having grater than 48 hours. But we need to ignore weekends 

 

if any error is occurred on Friday  it has to wait for 48 hours as weekends are not calculated, so error will stay and will not calculate difference for this type of records.

vsoni
Alteryx
Alteryx

one way of solving this is to minus 48 hours from the error time where the day is a friday to account for the weekend:

vsoni_0-1635148143201.png

 

vnn2492
7 - Meteor

Thanks lot !

 

it helped me 🙂

Labels