Skip to main content
3-Newcomer
September 9, 2025
Solved

OData filter with datetime

  • September 9, 2025
  • 1 reply
  • 378 views

Version: Windchill 13.0

 

Use Case: Sending GET request to Windchill OData with 'LastModified' filter set to 2025-09-08T12:34:57Z: Windchill/servlet/odata/v8/ChangeMgmt/ChangeTasks?%24filter=LastModified%20eq%202025-09-08T12%3A34%3A57Z&%24orderby=LastModified%20desc


Description:

As result, I receive all ChangeTasks from 2025-09-08. It seems OData service doesn't check time, only date. Is there any solution to this? Other operators like 'gt' behave the same way.

Best answer by rajeshd105

Hi @KK_13699599 ,

 

You have to use query parameter ptc.search.allowFilterOnTime to filter objects based on time in Odata Rest call.

The url should look like below

Windchill/servlet/odata/v8/ChangeMgmt/ChangeTasks?$filter=LastModified eq 2025-09-08T12:34:57Z&ptc.search.allowFilterOnTime=True&$orderby=LastModified desc

 

Refer Article - CS345190 - How to filter a DateTimeOffset value in Windchill REST Services by both date and time in Windchill PDMLink

 

1 reply

12-Amethyst
September 12, 2025

Hi @KK_13699599 ,

 

You have to use query parameter ptc.search.allowFilterOnTime to filter objects based on time in Odata Rest call.

The url should look like below

Windchill/servlet/odata/v8/ChangeMgmt/ChangeTasks?$filter=LastModified eq 2025-09-08T12:34:57Z&ptc.search.allowFilterOnTime=True&$orderby=LastModified desc

 

Refer Article - CS345190 - How to filter a DateTimeOffset value in Windchill REST Services by both date and time in Windchill PDMLink