Using a date for a datetime field in a SOQL Query
CreatedDate is a datetime field so I guess you would need to specify the time component.
Can you do something like where you just append the time portion to be 12 am by default.
WHERE CreatedDate > 2005-10-08T00:00:00Z
Or you can use Date Literals like
WHERE CreatedDate > YESTERDAY
For more on date formats and more literal values see,
The advice in another answer to use "DAY_ONLY()" is the correct answer. Otherwise a developer would have to write, "where createddate >= yyyy-mm-ddT00:00:z and createddate < yyyy-mm-ddT00:00:00z" where the second date is actually the day after the first (or some similar bounded comparison). If had had to choose (and I just did today), I would use DAY_ONLY(). https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_date_functions.htm