I have created a DateTable from a SQL query. This contains various names and addresses of course participants. In addition, the DateTime contains the date of the course start. I now want to filter the DateTable so that only entries with a greater or same date as today are visible.
$OpenTable2 = $OpenTable | Where-Object {$_.EventStart -ge [datetime]::today}
However, I always get the error message:
InvalidOperation: Cannot compare “” because it is not IComparable.
From my point of view, both values should be DateTime and not a string. When I look with *getType(), it also shows me DateTime. With other tables I did not have this problem. Is it possibly due to the DataTable object? Does anyone have another idea?