How can we set end date as one month from today's date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 02:37 AM
How can we set end date as one month from today's date?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 02:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 02:45 AM
Hi,
A helpful link on the wiki re dates and using the GlideDateTime object below.
The method you require is:
Example
var gdt = new GlideDateTime("2011-08-31 08:00:00");
gdt.addMonthsUTC(2);
gs.print(gdt.getDate());
Output:
*** Script: 2011-10-31
Adds a specified number of months to the current GlideDateTime object. A negative parameter subtracts months. The method determines the UTC date and time equivalent to the value stored by the GlideDateTime object, then adds or subtracts months using the UTC date and time values. This method is available starting with the Eureka release.
http://wiki.servicenow.com/index.php?title=GlideDateTime#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2017 02:53 AM
Hi Robbie,
I need to set end date on service catalogs, for this i need to write catalog client scripts, could you assist me for this configuration on items
Thanks,
Burra

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-31-2017 02:50 AM