How do I get to know if a date has passed or not?

Hello all,

I have an Excel as my input file with three headers to date, control & result.

Conditions :-

  1. If the “control” is “no” and the “to date” is a upcoming date, the result should be “current date”.

  2. If the “control” is “no” and the “to date” has already passed, the result should be the “to date”.

  3. If the “control” is “yes” and the “to date” has already passed, the result should be the “to date”.

The result should be like this :point_down:

Please help me with this.

Thank you.

@uio,

I hope you are looking option to check the second condition.

  1. Declare a datetime variable as parameterDate
  2. Use Assing activity with this variable parameterDate and pass the value as DateTime.ParseExact(“PassToDateHere”, “dd.MM.yyyy”, CultureInfo.InvariantCulture)
  3. Declare another datetime variable as todaysDate and assign today’s date in it using Assign activity as DateTime.Today
  4. Then using a IF Activity you check like this “parameterDate < todaysDate”, then it is a past date else it is a future or current date

Can you please attach and send an xaml file ?

@uio,

Check this workflow

CheckDate.xaml (5.9 KB)