Is $StartDate a vlaue of type DateTime?
There is a test project linked in the Mendix Documentation, maybe you can doublecheck there your case.
An option that works is to convert your date to a long. OQL can compare dates from the database with long values. There is a Java action in CommunityCommons called DateTimeToLong that you can use to convert it.
***Editted since my first remarks was not correct***
This is how to do it: First convert the Date-parameter to a string ($Startdate) using this format
Next step: feed that string to another string holding the OQL statement.
'select * from "Sales.Order" where Date < '''+$StartDate+''';'
Then feed the resulting statement to the OQL:
select * from "Sales.Order" where Date < '2020-07-09';
OQL want an attribute on the left expression part
I extended the OQL-examples on page https://mydemoversion8-sandbox.mxapps.io/p/OQL with an example showing this behavior and taking in a Date-parameter.
Also added an example for a DateTime parameter.