Skip to main content
November 24, 2022
Question

Date & Time Filter in Query entity for tasks

  • November 24, 2022
  • 2 replies
  • 0 views

Hi All,

How to get the tasks which are requestedOn/created today, Need to return only today's date & time requests

thanks in advance

2 replies

harshitb6843
November 24, 2022

You will need to create two filters in your logical expressions. 

  1. Where the requestedOn time is greater than the start of the day. i.e. 00:00:00 hrs
  2. Where the requestedOn time is lesser than the end of the day. i.e. 23:59:59 hrs
vinays024987
November 24, 2022

This could be an alternative:

a!queryFilter(
        field: "requestedOn",
        operator: "between",
        value: {
          userdatetime(year(now()),month(now()),day(now()),0),
          userdatetime(year(now()),month(now()),day(now()),24)
        }
      )