DataTime user filter

Hi 

i am trying to filter the createdOn filed with both data and time 

Example : I need to get data from 16-04-2024 1:00AM to 16-04-2024 2;00AM

can any one help me how to implement this ?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    Hi  could try this code and let me know this meets your requirement

    a!queryEntity(
      entity: /*your DSE*/,
      query: a!query(
        logicalExpression: a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "date",
              operator: ">=",
              value: ri!startDate
            ),
            a!queryFilter(
              field: "date",
              operator: "<=",
              value: ri!endDate
            )
          },
          ignoreFiltersWithEmptyValues: true
        ),
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: 50
        )
      ),
      fetchTotalCount: false
    )

Reply
  • 0
    Certified Senior Developer

    Hi  could try this code and let me know this meets your requirement

    a!queryEntity(
      entity: /*your DSE*/,
      query: a!query(
        logicalExpression: a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field: "date",
              operator: ">=",
              value: ri!startDate
            ),
            a!queryFilter(
              field: "date",
              operator: "<=",
              value: ri!endDate
            )
          },
          ignoreFiltersWithEmptyValues: true
        ),
        pagingInfo: a!pagingInfo(
          startIndex: 1,
          batchSize: 50
        )
      ),
      fetchTotalCount: false
    )

Children