1

The following is working:

responses/desc/50000/1/1525756206/json?X-apikey=542c0603951a208c4be688002d36f48808c40116174

But not this:

responses/desc/50000/1/@{formatDateTime(adddays(utcnow(), -6), '%a %b %d %H:%M:%S +0000 %Y')}/json?X-apikey=542c0603951a208c4be688002d3c40116174

Even this is not working:

responses/desc/50000/1/@{formatDateTime(adddays(utcnow(), -6), '%s')}/json?X-apikey=542c0603951a208c4be688002d3c40116174

So it is @{formatDateTime(adddays(utcnow(), -6), '%a %b %d %H:%M:%S +0000 %Y')} vs 1525756206 vs @{formatDateTime(adddays(utcnow(), -6), '%s')}

Can anybody help me here? I have been stuck here for a couple of days. How to calculate or use seconds in data factory?

Basically when I am using @{formatDateTime(adddays(utcnow(), -6), '%a %b %d %H:%M:%S +0000 %Y')}, It just ignore the filters/tag in the URL.

4

2 回答 2

11

最后使用以下内容计算并使用纪元时间戳作为动态参数。

@{div(sub(ticks(adddays(utcNow(), -1)), ticks('1970-01-01')),10000000)}

礼貌:Azure 数据工厂产品团队

于 2018-05-24T02:44:35.620 回答
1

该表达式对我有用,但某些格式说明符不可用。您可以在此文档中找到支持的格式说明符:custom-date-and-time-format-strings

并且formatDateTime(adddays(utcnow(), -6), '%s')只会显示第二个数字,formatDateTime(adddays(utcnow(), -6), 's')如果您想以这种格式显示时间,您可以尝试:2018-05-16T07:55:18。(参考:标准日期和时间格式字符串

于 2018-05-22T08:00:00.563 回答