How do use gs.monthsAgoStart?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2016 01:50 PM
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..
Labels:
- Labels:
-
Scripting and Coding
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2016 06:32 AM
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