Soql 查询检索两个日期之间的机会
我正在尝试检索 2011 年 1 月 1 日至 2011 年 6 月 30 日之间创建的机会。
Select o.CreatedDate, o.Id, o.LastModifiedDate
from Opportunity o
where o.CreatedDate > '1/1/2011' and o.CreatedDate < '12/31/2011'
order by o.LastModifiedDate
由于 createate 是日期时间,我收到一条错误消息,指出createdDate 是日期时间,不应用引号引起来。
有人可以帮助了解如何使此查询正常工作吗?我只是想让这个查询让它在 apex 资源管理器中运行,这不是 apex 代码的一部分
I am trying to retrieve opportunities created between 01-01-2011 and 06-30-2011.
Select o.CreatedDate, o.Id, o.LastModifiedDate
from Opportunity o
where o.CreatedDate > '1/1/2011' and o.CreatedDate < '12/31/2011'
order by o.LastModifiedDate
since createdate is a datetime i get a error saying createdDate is datetime and should not be enclosed in quotes.
Can someone help on how to get this query working. I just want this query to get it running in apex explorer, this is not part of apex code
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
用于检索两个日期之间机会的 SOQL 查询:
SOQL query to retrieve opportunities between two dates: