Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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