How to compare date in Excel with actual date?

Hi together. I have following problem:

I have in Excel 2 Columns: One is “Loading Date” and second “Delivery Date”.
Both dates are already existing when the bot is executing.

In this case the bot should read out the “Loading date” and compare if the date equals the actual date today. If there is a difference of some days, the bot should add this difference to the “Delivery Date”.

For example, “Loading Date” = 14.02 | “Delivery Date” = 17.02
Today is the 15.02 so the bot should recognize the difference of 1 day between the "Loading date and the actual date so change the “Delivery date” to 18.02 because of the 1 day difference.
Hope you can follow my instructions. Many thanks in advance for your help guys!

  1. Read the Excel file containing the date into UiPath Studio using the “Excel Application Scope” activity and the “Read Range” activity. This will allow you to access the date value stored in the Excel file…
  2. Use the “Get Current Date Time” activity in Studio to retrieve the current date and time.
  3. Convert the date value from the Excel file into a DateTime object using the “DateTime.Parse” method. This will allow you to perform comparisons between the Excel date and the current date.
  4. Compare the Excel date with the current date using conditional statements like “If” or “Switch”. You can use comparison operators like “>”, “<”, “>=”, “<=”, or “==” to perform the comparison.
  5. Depending on the result of the comparison, you can perform further actions.

Please mark it as a solution if you find this helpful,
Happy Automation :grinning:

Regards,
Pratik Maskar

1 Like

Thank you Pratik. How can i add then the difference of days to the Deliverydate?