Can anyone create a business working days workflow

  1. I have a date for example today : 06/25/2023 (US FORMAT)… I want to put 5 business days as the follow up date \
  2. I have a date for example today : 06/25/2023 (US FORMAT)… I want to put 2 business days as the follow up date
  3. I have a date for example today : 06/25/2023 (US FORMAT)… I want to put 1 business days as the follow up date

These three Scenarios i have…I have to develop for these three Scenarios

@katta_nikhil

Create a xaml with two arguments in_numberofdays of integer type, in_strtdate of datetime type and out_requiredate as datetime type and create a variable int_days

Int he xaml one while loop condition as Not in_Numberofdays.Equals(int_days)
Inside the loop use assign with out_requireddate = in_startdate.adddays(1)
Now use if condition with out_requireddate.Dayofweek.ToString.Equals("Sunday") Orelse out_requireddate.Dayofweek.ToString.Equals("Saturday")
On then side leave empty and on else side use assign with int_days = int_days + 1

Now send any date as input and the number of days to be added it would give the output date which is of added business days

Cheers

Cheers

bro can u please do and send me the xaml file/… its helps me alot bro plzz

dsays.xaml (9.4 KB)

see this is correct or not … plz do some changes if it is wrong

@katta_nikhil

Please check this

WorkingDays.xaml (10.2 KB)

cheers

bro iam getting the date with the format of “MM/dd/yyyy” and i want add some days based on the scenarios

@katta_nikhil

It is a separate argument …you can send the input arguments as you need…you can send in_StartDate as Cdate("YourDateString") Or DateTime.ParseExact(inputdate, "MM/dd/yyyy", System.Globalization.CultureInfo.InvariantCulture) and give in_Numberofdays as you need…how much ever you want to add

cheers

bro im not getting the required output bro

  1. see for suppose if i get the input “06/23/2023” and if i put 5 days i want output like the Friday that is "06/30/2023 " This is one scenario

@katta_nikhil

This is exactly what it is doing

out_EndDate is the output. please change direction to out

cheers

yes , thank you broooooo

Man u r the life saver

thank you so much

1 Like

bro iam getting the holidays list also… i also consider that … how can we skip the holidays also

@katta_nikhil

In the if condition add the checking for holiday as well…

you can have in excel and then read the excel and use filter datatable before if condition on date and then use filtereddt.count>0

cheers

can u send me workflow plzz

@katta_nikhil

This what you can use in if condition

{"Sunday","Saturday"}.Contains(out_EndDate.DayOfWeek.ToString) OrElse in_DT_Holidays.AsEnumerable.Where(function(x) Cdate(x("DateColumn").ToString).ToString("MM/dd/yyyy").Equals(out_EndDate.ToString("MM/dd/yyyy"))).Count>0

in_DT_Holidays is the datatable that is to be added as argument to the xaml to send the datatble containign holidays

chnage the DateColumn as per the column name in your excel

and used cdate if dateformat is not being picked then try with datetime.parseExact

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.