Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Date Query Parameter in ISO 8601 standard doesn't return results

myusufk90
Tera Contributor

Hi Everyone,

We have a system that's integrating to our instance via API. When the system attempts to connect to our instance using query 1, no results are returned but when query 2 is executed, results are returned. Is there any way for us to configure our instance to accept both formats of the date/time format?

 

Query 1:

https://instance_name.service-now.com/api/now/v2/table/task?sysparm_query=sys_updated_on>=2023-10-27T23:59:59Z^sys_updated_on<2023-11-01T23:59:59Z^ORDERBYsys_created_on&sysparm_limit=10000

 

Query 2

https://instance_name.service-now.com/api/now/v2/table/task?sysparm_query=sys_updated_on>=2023-10-27 23:59:59^sys_updated_on<2023-11-01 23:59:59^ORDERBYsys_created_on&sysparm_limit=10000

 

 

1 REPLY 1

ARUN MANOJ
Tera Contributor

Hi,

It is due to timezone , where query 1, this query retrieves records updated between October 27, 2023, at 23:59:59 UTC, and November 1, 2023, at 23:59:59 UTC. Where query 2 , timezone not specific so, it will fetch data as per the date/time.

 

I Hope it will be helpful,