filter values according to date from date and time field

I have a requirement where i need to filter values according to date but the field in CDT is given as date and time field. 

For Eg: bookingDate in CDT is the date and time field.  But, when I filter the data in the expression rule ,  I need to get data based on booking date only not time. ( For eg: I need to get the number of people who booked the tickets for the day but i dont want  according to date and time I just want the count for the particular entire day). Can anyone please help me to solve this!

Thank you in advance.

  Discussion posts and replies are publicly visible

Parents Reply
  • a!localVariables(
      a!queryEntity(
        entity: cons!PO_MEDICALINFO,
        query: a!query(
          aggregation: a!queryAggregation(
            aggregationColumns: {
              a!queryAggregationColumn(
                field: "reportingDoctor",
                isGrouping: true
              ),
    
              a!queryAggregationColumn(
                field: "patientId",
                alias:"patientCount",
                aggregationFunction:"COUNT"
    
              ),
              a!queryAggregationColumn(
                field: "reasonForVisit",
                isGrouping: true
              ),
              a!queryAggregationColumn(
                field: "appointmentDate",
                isGrouping: true
              )
    
            }
    
          ),
          logicalexpression: a!queryLogicalExpression(
            operator: "AND",
            filters:  {
              a!queryFilter(
                field: "reasonForVisit", 
                operator: "=",
                value:ri!reasonForVisit,
                
              ),
             
                  a!queryFilter(
                    field: "appointmentDate",
                    operator: ">=",
                    value: todatetime((ri!appointmentDate))
                  ),
                  a!queryFilter(
                    field: "appointmentDate",
                    operator: "<",
                    value: todatetime(ri!appointmentDate + 1)
                  ),
             
             
              
              
              a!queryFilter(
                field: "reportingDoctor",
                operator: "=",
                value:ri!reportingDoctor
              ),
            },
            ignorefilterswithemptyvalues: true()
    
          ),
        pagingInfo: a!pagingInfo(
            startIndex: 1,
            batchSize: -1
          )
        ),
        fetchTotalCount: true
      ).data,
       
        
     
          )

    AND Operator is used in my logical expression

Children
No Data