I was wondering if it is possible to compare a DateTime
and Date in SOQL
.
I am trying to pull data for the product that where sold today Date.Today()
.
Purchase_Date__c
is a DATETIME
field
Date d = Date.today();
hot = [SELECT id,Name,NRProduct__c, QuantityOrdered__c,Purchase_Date__c
FROM MWSOrderItem__c
WHERE Purchase_Date__c =:d AND Buyer_lookup__c =:UserInfo.getUserId() ];