OK, so I answered my own question, and the solution is pretty obvious. The way the date parameters ought to be referred to is as a
string . Then the SQL should have code to convert the string to a date value. Here's some sample SQL for getting records from the projects table:
SELECT *
FROM SRM_PROJECTS
WHERE CREATED_DATE = TO_DATE('{?p_date}', 'YYYY-MM-DD HH24:MI:SS')
As you can see, my date parameter, ?p_date, is referenced as a string, due to the single quotes around it. It is then necessary to cast the string to a date in the DB's specific syntax (the sample above is for Oracle).
Note: The above code is very simple and meant to illustrate the point only. It would not work well in real life because the date coming into the code (as ?p_date) would have to match the dates in the table exactly, all the way down to the second.