javascript:gs.minutesAgoStart on Scheduled Job script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2017 02:40 PM
I was trying to use a scheduled job to create a change ticket, if I want to set the work start / work end field to a specific time, what's the equivalent of javascript:gs.minutesAgoStart when I translate It to a script using the scheduled job? The thing is the I've already used the javascript:gs.daysAgoStart and javascript:gs.daysAgoEnd for the date using the template within the scheduled job. Or Is It much better if I use a full script for the date/time field for workstart/workend field of the change ticket?
Regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2017 03:15 PM
Thanks James for the update. for the time field sample code. Adjust it accordingly.
var start = new GlideDateTime("2011-01-01 12:00:00");
var end = new GlideDateTime("2011-01-01 12:00:00");
gr.start_date = new GlideDateTime(start);
gr.end_date = new GlideDateTime(end);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2017 03:08 PM
Thank you Chirag!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2017 03:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-04-2017 04:20 PM
Hi James,
If your query is resolved, would you mind marking answer as correct and close the thread.