- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2018 09:23 AM
Hello,
I am looking to extract cmdb data from another application using the REST api call. I want to export data based on a date range, but by not hard coding the dates. I tried by using the sysparm_query=sys_created_onONYESTERDAY+10, but it still exports all the records. Does the filter qualifier does not accept days addition or subtraction with the date values.
I am trying to resolve the issue of working withing the CSV export limit. Possible uses cases -
1. filter by date between 1st till 15th of the month
2. filter by date between 16th till end of the month
3. filter by {current date -5}
e.g. - to provide a list from last 5 days only.
https://<instance>.service-now.com/cmdb_ci_computer_list.do?CSV&sysparm_default_export_fields=all&sysparm_query=sys_created_onONYESTERDAY+4&sysparm_orderby=sys_created_on
Thank you,
Vikas Bhatia
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2018 04:53 AM
Try the 'Relative' operator.
The encoded query for this screenshot looks like this. You can right-click the breadcrumbs or access the URL to get the query associated with any list in the system.
https://yourinstance.service-now.com/incident_list.do?sysparm_query=sys_updated_onRELATIVEGE%40dayofweek%40ago%405
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2018 05:56 AM
Great.. Thanks Mark, I will try that out.
-Vikas