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.

How do use gs.monthsAgoStart?

zsquared
Tera Contributor

Hello,

I am having trouble understanding how to use the gs.monthsAgoStart()

I am just trying to find the date 3 months from today.

var newTime = new GlideDateTime();  

  var startTime = gs.monthsAgoStart(3);

Not sure where I am supposed to put my newTime variable..

5 REPLIES 5

Abhinay Erra
Giga Sage

Use encoded queries in this case. It is much easier. Set your filter for that table and copy the query and use that in the addEncodedQuery();


http://wiki.servicenow.com/index.php?title=Encoded_Query_Strings