带有日期和时间过滤器的KQL查询 [英] KQL query with date and time filter

查看:800
本文介绍了带有日期和时间过滤器的KQL查询的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个任务列表的字段截止日期。截止日期是日期和时间,但KQL可以仅按日期过滤(例如今天)。 

We have a field Due date for Task list. The due date is with date and time but the KQL it possible to filter only by date (e.g Today). 

1)我如何使用当前的时间(如当前时间)

1) how i can use the current Timing also (like currentime)

var taskDueDate ="" ;;
var taskDueDate = "";

推荐答案

在JavaScript代码中,我们可以使用以下代码行来获取当前日期。

In JavaScript code, we can use the following line of code to get the current date.

var currentDate= new Date();

在C#代码中,我们可以使用它。

In C# code, we can use this.

var currentDate=System.DateTime.Now;

如果要在Web部件中显示具有读取颜色的任务,我们需要编写一些JavaScript代码来设置CSS,并根据某些条件来实现它。仅使用CSS,我们无法写出一些条件。

If you want to display the task with read color in web part, we need write some JavaScript code to set the CSS base on some conditions to achieve it. Using only CSS, we can't write some conditions.

最好的问候,

Dennis


这篇关于带有日期和时间过滤器的KQL查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆