date functions in soql code example
Example: soql more than today
SELECT Date__c FROM Object__c
WHERE Date__c < TODAY
ORDER BY Date__c DESC
LIMIT 1
SELECT Date__c FROM Object__c
WHERE Date__c < TODAY
ORDER BY Date__c DESC
LIMIT 1