Compare one column with other column of different excel


#1

HI,
i have input date i need to compare this date with another excel sheet
example my date is 9 i need to check in another excel sheet whether 9th date as value “L” is or not
Templates1.xlsx (29.8 KB)


#2

Not going to give you the direct answer :slight_smile:

Extract both dates into variables and then compare them.

You should use DateTime.Parse, DateTime.ParseExact in combination with DateTime.TryParseExact to ensure that the values you have imported are in a format that can be compared.

https://msdn.microsoft.com/en-us/library/system.datetime.parse(v=vs.110).aspx

The hard part is converting them to dates - once you have done that you can use things like DateDiff to compare them.

https://msdn.microsoft.com/en-us/library/aa262712(v=vs.60).aspx

Give it a try - shout if you get stuck and search the forum for examples.

RD