SOQL查询LastmodifiedDate减去一天 [英] SOQL Query for LastmodifiedDate minus one day

查看:192
本文介绍了SOQL查询LastmodifiedDate减去一天的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我们正在以增量方式从销售人员加载数据.我们将LastModifiedDate存储在表中,并且在管道的下一个触发器中,它将检查对象的上次修改日期,并且将获取大于上次修改日期记录的数据.

We are loading data from sales force in delta approach. We are storing LastModifiedDate in table and in next trigger of pipeline it will check the last modified date of the object and it will fetch greater than of last modified date records.

现在,我需要获取数据上次修改日期减去一天.我正在使用SOQL查询来获取数据.下面是示例代码.

Now I need to fetch the data Last Modified date minus one day. I m using SOQL query to fetch the data. Below is the sample code.

SELECT
ID,
名称,
LastModifiedDate
来自帐户WHERE LastModifiedDate> =
@ {formatDateTime(activity('LookUpIncrementalValueActivity').output.firstrow.IncrementalValue,'yyyy-MM-ddTHH:mm:ssZ')}

SELECT
Id, 
Name,
LastModifiedDate
FROM Account  WHERE LastModifiedDate >=
@{formatDateTime(activity('LookUpIncrementalValueActivity').output.firstrow.IncrementalValue,'yyyy-MM-ddTHH:mm:ssZ')}

对于上述查询,我​​还需要提前一天获得数据.

For the above query I need to get one day prior data as well.

预先感谢.

MG

推荐答案

MG,

我发现了一个类似的线程也可能对您有用:

I found a similar thread that might be useful in your case as well :

https://developer.salesforce.com/forums/?id=906F000000092tTIAQ

https://developer.salesforce.com/forums/?id=906F000000092tTIAQ

看看这个,让我们知道这是否对您有帮助.否则,我们可以继续进行进一步的研究.

Have a look at this and let us know if this helps you. Else, we can continue to probe in further.


这篇关于SOQL查询LastmodifiedDate减去一天的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆