New to Ui Path

Hi All,

New to UI path here and looking for some advice on 1 particular item i’m trying to design, but first if i break it down.

I have a date on a spreadsheet and i want to create a decision that will check if the date qualifies for a decision

  1. I need to take this date (which i’ve done)
  2. I then need to take todays date, add one month to todays date
  3. I then need to look 15 days before or after this date and validate if the date provided in the spreadsheet falls into that date range.

Any help/advice would be greatly appreciated.

Thanks

Hello malcs.

You can get the current date by typing now.
You can add/subtract days or months by using the AddDays or AddMonths methods. Just make sure that you apply the methods to an datetime variable.
You can just compare the dates in an if.

I have attached an example.
CheckDates.xaml (6.6 KB)

2 Likes

@malcs1 Please find below xaml.
ValidateDateInRange.xaml (7.9 KB)

Use VB DateTime.Now.Date.AddMonth(1) to get current date and add 1 month to it.

Then get upper and lower range of date by adding 15 and -15 days accordingly.
Use Datetime.Compare method to get the difference.

In the xaml i have removed comparison of time. If you want to compare time as well, just use DateTime.Now.AddMonth(1)

Thanks All!