简体   繁体   English

从alist获取最大日期使用CAML查询

[英]Get Max Date Using CAML Query From alist

如何从列表日期列中获取最大日期和最小日期

The brute force approach is to create two queries that will retrieve the list content sorted by date asc and desc. 蛮力方法是创建两个查询,检索按日期asc和desc排序的列表内容。 I know that this sucks but at least you can move on with you project and refine the query later on. 我知道这很糟糕,但至少你可以继续进行项目并稍后改进查询。

If only it was possible to retrieve top 1 then it might even work in production. 如果只能检索前1,那么它甚至可能在生产中工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM