Hi everyone, astra question

I'm trying to compare some dates for this website.
Say for instance a search is ran which returns say 10 items that have 4 columns (item num, date1, date2, & user ID. The items have checkboxes next to them.
Two of the columns are dates; I would like to compare date1 to date2. If the dates match, go to the next one and compare, if they don't match write item num and user id to a table. On some of the searches the system can return up to 2500 item (rows).

Thanks in advance.