We cannot directly query with datetime field in where condition.
So you will need to use Date functions in SOQL to query using datetime field in where condition
Example:
Opportunity =[SELECT Id, Name FROM Opportunity WHERE DAY_ONLY(CreatedDate)= '2011-10-16'];
Refer other date functions which are available so that you can query easily using datefield in where condition.
Date functions
8 comments:
While trying with that Query it shows error.
we have to write that Query like this
Opportunity =[SELECT Id, Name FROM Opportunity WHERE DAY_ONLY(CreatedDate)= 2011-10-16];
Superb i really enjoyed very much with this article here. Really its a amazing article i had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.
Digital Marketing Company in Chennnai
Thank you for sharing such a nice and interesting blog with us. i have seen that all will say the same thing repeatedly. But in your blog, I had a chance to get some useful and unique information. I would like to suggest your blog in my dude circle. please keep on updates. hope it might be much useful for us. keep on updating...
Android training in chennai
Superb. Really enjoyed very much with this article here. Really its a amazing article i had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your updation.
Android training in chennai
Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article.thank you for sharing such a great blog with us. expecting for your.
Digital Marketing Company in India
seo Company in India
your information is really awesome as well as it is very excellent and i got more interesting information from your blog. Android App Development Company in Chennai
Wonderful blog.. Thanks for sharing informative blog.. its very useful to me.. Security Mobile alerts Chennai
Wonderful bloggers like yourself who would positively reply encouraged me to be more open and engaging in commenting. So know it's helpful..
Dental Hospital In Chennai
Post a Comment