有人以前看到过这种格式:'yyyy-mm-ddthh:mm:ss.sssssssz;我被6位数毫秒(SSSSS)扔了
我目前正在为Salesforce CDP制作摄入的API架构文件。使用Postman,我试图使用各种规格在有效载荷中格式化数据类型字段:
- yyyy-mm-dd'hh:mm:ss'z
- yyyyy-mm-ddthh:mm:mm:ss.sssz
- yyyy-mm-ddthh :MM:SSZ
等。根据Salesforce的
2019-11-06T06:24:42.558008Z
,我终于设法将带有正确填充日期字段的记录插入CDP数据对象。但是,我以前从未见过这种格式,我不确定如何使用此格式 - 我在上面找不到任何文档,可以用来更好地理解它。 Salesforce支持也无法提供更多的解释,而不是“这是有效的格式”。
任何帮助或资源将不胜感激。
(另外,其他人是否曾经有Salesforce CDP的这种问题?这个平台非常新,有很多错误,而且它仅接受上述格式对我来说似乎有些奇怪...)
I am currently working on a Ingestion API Schema File for Salesforce CDP. Using postman, I was trying to format the data type fields in my payloads using various specifications:
- yyyy-mm-dd'T'hh:mm:ss'Z
- yyyy-mm-ddThh:mm:ss.SSSZ
- yyyy-mm-ddThh:mm:ssZ
and so forth. According to Salesforce's documentation, the payload data type field should be in ISO 8601 UTC Zulu with format yyyy-MM-dd'T'HH:mm:ss.SSS'Z (which does not work as the field value returns empty when ingested, although the call response is 'true'), however, talking to Salesforce support, they have suggested I try the following format:
2019-11-06T06:24:42.558008Z
With this, I finally managed to insert a record with correctly populated date fields into the CDP data object. However, I have never seen this format before and I am not sure how to work with this - I couldn't find any documentation on it that I can use to better understand it. Salesforce support was also not able to provide more explanation than "this is the format that works".
Any help or resource would be greatly appreciated.
(Also, did anyone else ever have this type of issue with Salesforce CDP? The platform is quite new with many bugs and the fact that it only accepts the above format seems a little strange to me...)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个 rfc 3339 日期,日期,ISO 8601的“配置文件”
。指定分数秒的小数位数。但是,例如,例如 使用六位数微秒:
不同的salesforce apis,则具有不同的日期时间格式拟合要求,并且对它们可能非常严格。 (而不是全部符合RFC)。例如,批量API无法与六位数微秒的正确工作。除了将数据符合您使用的API的特定期望之外,您几乎无法做到。
It's an RFC 3339 date, a "profile" of ISO 8601.
The RFC does not specify the number of decimal places for the fractional seconds. However, there is precedent in, for example, the Python standard library for using six-digit microseconds:
Different Salesforce APIs have different datetime-formatting requirements and can be quite strict about them. (And not all conform to the RFC). For example, the Bulk API does not work correctly with six-digit microseconds. There's little you can do besides conforming your data to the specific expectations of the API you're using.