Skip to main content
New Participant
Nov 24, 2022 7:38 AM UTC
Question

Date & Time Filter in Query entity for tasks

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
Brainy
Nov 24, 2022 7:43 AM UTC

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
Inspiring
Nov 24, 2022 11:52 AM UTC

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)
        }
      )