cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X

Translate the entire conversation x

OData filter with datetime

KK_13699599
3-Newcomer

OData filter with datetime

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.

ACCEPTED SOLUTION

Accepted Solutions

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

 

View solution in original post

1 REPLY 1

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

 

Announcements
Top Tags