Filter data between filter of two dates

a!localVariables(
  local!date: todatetime(ri!startTime, ri!endTime),
  local!pId: a!queryEntity(
    entity:cons!DS_DATA,
    query:
    a!query(
      selection:
        a!querySelection(
          columns: {
            a!queryColumn(
              field:"pId",
              alias:"pId"
            )
          }
        ),
      logicalExpression: {
        a!queryLogicalExpression(
          operator: "AND",
          filters: {
            a!queryFilter(
              field:"startTime",
              operator: ">=",
              value : local!date
            ),
            a!queryFilter(
              field:"endTime",
              operator: "<=",
              value : local!date
            ),
            
          }
        )
      },
      pagingInfo: a!pagingInfo(
        startIndex: 1,
        batchSize: -1
      )
    ),
    fetchTotalCount: true
  ).data,

  Discussion posts and replies are publicly visible

Parents Reply
  • a!localVariables(
     local!startDate: todatetime(ri!startTime),
      local!endDate todatetime(ri!endTime),
      local!pId: a!queryEntity(
        entity:cons!DS_DATA,
        query:
        a!query(
          selection:
            a!querySelection(
              columns: {
                a!queryColumn(
                  field:"pId",
                  alias:"pId"
                )
              }
            ),
          logicalExpression: {
            a!queryLogicalExpression(
              operator: "AND",
              filters: {
                a!queryFilter(
                  field:"startTime",
                  operator: ">=",
                  value : local!startDate
                ),
                a!queryFilter(
                  field:"startTime",
                  operator: "<=",
                  value : local!endDate
                ),
                
              }
            )
          },
          pagingInfo: a!pagingInfo(
            startIndex: 1,
            batchSize: -1
          )
        ),
        fetchTotalCount: true
      ).data,
      local!pIdR:index(
        local!pId,
        "pId",
        {}
      ),

Children