How to select a dynamic date from a dropdown box

I have a process that I run each day where I need to select the date that is 2 business days prior to the current date.

How do I set it up so that:

  • on March 6th, it selects March 4th
  • on March 7th, it select March 5th
  • on March 8th, it select March 6th
  • on March 11th (Monday), it selects March 7th
  • etc.

Thanks in advance.

date

Hi @Gavin_Mcmaster,

Can’t you use type into into the text box of drop down box and write the date if the text box is editable.

@anil5 yes that works, but how do I make the text dynamic. Today the text will be “3/4/2019” but tomorrow I need it to be “3/5/2019” without updating the workflow

Try to use now.

1 Like

Hi @Gavin_Mcmaster,

As you told you want to select 2 days prior to the today’s date use now.adddays(2)

1 Like

Thanks guys, got it working.

@Gavin_Mcmaster,

Try this way:

For checking Saturday and Sunday:

Now.adddays(-2).DayOfweek = DayOfweek.saturday

Now.adddays(-2).DayOfweek = DayOfweek.sunday

5 Likes

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