I'd have to do screen sharing and debug this in context. I'd start by adding this below line 38:
<?php
echo("batch date:". $rsDecisions->getColumnVal("batch_date") . "<br>");
echo("batch date 2:". $rsDecisions->getColumnVal("batch_date2"). "<br>");
echo("ebird date:". $rsDecisions->getColumnVal("ebird_batch_date"). "<br>");
echo("session batch date:". $rsDecisions->getColumnVal("batch_date") . "<br>");
echo("session which:". $_SESSION['batch_date']. "<br>");
echo("ebird date:". $_SESSION["which_batch"]. "<br>");
die();
?>
That will tell you the values of the variables you are using and trying to set to make sure they have the values you expect.