Relative Query for 30 days ahead?

Elizabeth26
Tera Contributor

I am trying to write a query that will be for 30 days in the future.

So, for example, due date is 30 days from now

I tried this but it doesn't seem to work. I can only get it work for 30 days ago. Is there a way to get a query for 30 days in the future?

due_dateRELATIVEEE@dayofweek@ahead@30

1 ACCEPTED SOLUTION

Leo8
Mega Expert

Hi Elizabeth,

 

You can use "RELATIVEGT": due_dateRELATIVEGT@dayofweek@ahead@30

 

Maybe this may help:

https://docs.servicenow.com/bundle/paris-platform-user-interface/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html

 

Best regards,

Leo

View solution in original post

6 REPLIES 6

Leo8
Mega Expert

Hi Elizabeth,

 

You can use "RELATIVEGT": due_dateRELATIVEGT@dayofweek@ahead@30

 

Maybe this may help:

https://docs.servicenow.com/bundle/paris-platform-user-interface/page/use/common-ui-elements/reference/r_OpAvailableFiltersQueries.html

 

Best regards,

Leo

Elizabeth26
Tera Contributor

Thank you! this worked perfectly!!

Mark Roethof
Tera Patron
Tera Patron

Hi there,

You can easily create such queries, by using the Condition Builder on breadcrumbs. So creating a query on a list. That generated query can be copied and used within scripting.

Read about it in one of my older articles:
Utilizing the breadcrumb on lists to generate your query

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Can you help knowing where is this required?

Do you require exact 30 days from now?

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader