我已使用逻辑应用程序中的 formatDateTime() 将一列插入到表存储中,并输入正确的值,并且当我查看记录时,列类型显示为 DateTime:
但是,当我尝试查询此字段时,它默认为字符串,即使我将其更改为 DateTime 也不会返回任何结果。
我在 formatDateTime() 中尝试了无格式、标准格式和自定义格式,但没有任何结果。关于我缺少什么有什么想法吗?
According to some test, the value is still in "String" type but not "DateTime" type. This document shows us the method formatDateTime()
response a value in string.
So when we insert the value from method formatDateTime()
, it will insert a string into the storage table. It seems there is a bug in display of azure portal, it shows the type is "DateTime". But if we open the table storage in "Azure Storage Explorer" but not on Azure portal, we can find the TimeOfCreation
of new inserted record is in "String" type.
对于这个要求,很难得到“DateTime“ 在逻辑应用中输入值并将其插入表存储。我们可以只插入一个字符串。但是我们可以在将新记录插入表存储后编辑类型。我们可以在 Azure 门户或在“中执行此操作Azure 存储资源管理器”。如果在 Azure 门户上执行,只需单击“edit“记录并点击”Update“ 按钮不执行任何操作(因为类型已显示为“DateTime”)。如果在“ 中执行此操作Azure 存储资源管理器”,只需将类型从“更改为String" to "DateTime”并点击“Update之后,我们可以通过“TimeOfCreation”>=最近365天的成功来查询记录。
不好的是,我们只能对每个插入的记录手动执行此操作。我们无法在逻辑应用程序中解决此问题或批量更新类型(在门户或资源管理器中)。如果要批量更新类型,可以通过这个查询所有新插入的记录api(使用 $filter 过滤时间戳)。然后获取每条记录的PartitionKey
and RowKey
,然后循环它们。用这个api更新列TimeOfCreation
type.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)