# QueryParam in SDK not working

**URL:** <https://community.cumulocity.com/t/queryparam-in-sdk-not-working/315>\
**Category:** Forum\
**Tags:** cumulocity\
**Created:** [July 10, 2023, 6:04am UTC](https://community.cumulocity.com/t/queryparam-in-sdk-not-working/315 "2023-07-10T06:04:07Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Kai\_Sieben](https://dub1.discourse-cdn.com/flex005/user_avatar/community.cumulocity.com/kai_sieben/32/5541_2.png) [@Kai\_Sieben](https://community.cumulocity.com/u/Kai_Sieben)\
**Post date:** [July 10, 2023, 7:49am UTC](https://community.cumulocity.com/t/queryparam-in-sdk-not-working/315/4 "2023-07-10T07:49:27Z")

</div>

Hi Samanyu,

for this topic we discussed already in a different thread.  
May I know why this solution does not work for you for the “query” part?

You can use it like this:

```auto
QueryParam queryParam = CustomQueryParam.QUERY.setValue("creationTime.date ge " + "'" + CustomUtil.getDateWithTime() + "'").toQueryParam();

```

> [@How to use custom and other filters in Java sdk that are provided in REST Endpoints](https://community.cumulocity.com/t/how-to-use-custom-and-other-filters-in-java-sdk-that-are-provided-in-rest-endpoints/3909/2):
>
> Hi @Sam123 , for a time range you can use it as follows: Be aware of using “creationTime.date”, check [API documentation](https://cumulocity.com/api/10.15.0/#section/Supported-values). creationTime.date gt '2023-06-12T12:00:00.000Z' and creationTime.date le '2023-06-12T12:59:59.999Z See below and use “query” and just put the query above as value. In the “get” method you can set any query parameter like this The first argument can be the pageSize, here it is 50. import com.cumulocity.sdk.client.Filter; import com.cumulocity.sdk.client.QueryParam…

Regards, Kai

---

_[View the full topic](https://community.cumulocity.com/t/queryparam-in-sdk-not-working/315)._
