Need query expression to filter record having date and time based on two date range

Hi All,

I have stored date and time in DB and need a query expression to filter based on two dates range?

Thanks,

Deepak

  Discussion posts and replies are publicly visible

Parents Reply
  • Below,  is Error  for  DateTime Field(requestedDate) and ri!startDate(12/22/2020) and ri!EndDate(12/30/2020) is Date Picker input

    Expression evaluation error at function a!queryEntity: Cannot apply operator [LESS_EQUALS_THAN] to field [requestedDate] when comparing to value [TypedValue[it=7,v=2020-12-22]].

    a!queryEntity(
    entity: cons!PTS_TICKET_TEST,
    query: a!query(
    logicalExpression: a!queryLogicalExpression(
    operator: "AND",
    filters:{
    a!queryFilter(
    field: "requestedDate",
    operator: "<=",
    value: ri!StartDate
    ),
    a!queryFilter(
    field: "requestedDate",
    operator: ">=",
    value:ri!EndDate
    )
    }
    ),
    pagingInfo: a!pagingInfo(1,- 1)
    )
    ).data

Children