在我的cosmos db中,日期字段以以下字符串形式存储:
{ "ValidationWeekStartDay": "27-Apr-2020" }我必须编写一个查询来提取所有ValidationWeekStartDay大于当前日期的文档。如何在cosmos db查询中实现这个目标?
Select * from c where c.ValidationWeekStartDay > GetCurrentDateTime()
但是,这并不能给我正确的结果。
在我的cosmos db中,日期字段以以下字符串形式存储:
{ "ValidationWeekStartDay": "27-Apr-2020" }我必须编写一个查询来提取所有ValidationWeekStartDay大于当前日期的文档。如何在cosmos db查询中实现这个目标?
Select * from c where c.ValidationWeekStartDay > GetCurrentDateTime()
但是,这并不能给我正确的结果。
'27-Apr-2020' > '2020-08-17'
从c中选择stdDates,其中udf.formatdatetime(c.stdDates) > GetCurrentDateTime()