Excel - Compare two Dates and add a new Column

I have an excel list with two dates that i would like to compare.
Bildschirmfoto 2020-03-14 um 14.59.49

I want to create a new column “Posting date in the previous month”. The bot should then check for each line whether the “posting date” is in the month before the “goods issue date”. If this is the case, a yes should appear in the cell in the column “posting date in the previous month” and the cell should turn red. Otherwise a no should appear and the cell should be colored green.

What is the best way to build this in uipath?
Any help would be great :slight_smile:

Hai @RoboticApprentice
1. Use for each row to check the items(dates)
2.Use if activity to check whether the date is there exceed or not
3.In then field use write cell activity ( yes) and use “Set range color” activity to high light particular range
4.In else use same to high light (another color)
This may helps u little…

I have never worked with dates, can you tell me what exactly I have to write in the If condition to check whether the posting date is in the previous month of the goods issue date?

Hello @RoboticApprentice,

You have raised the same query in another thread Excel - Compare Dates - #2 by Nithin_P

I have written the exact code you can use.


kindly see mr. @Nithin_P’s words…

1 Like

RobotApprantice.zip (20.4 KB)

You will have to adjust the date format as per your system date format (for both goods issue date & posting date):

Hope this helps. Kudos :slight_smile:


Thank you so much :slight_smile: :slight_smile: