- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 12:46 AM
Hi,
By using the Set field values in ATF service now i want to set the outage end time.
By using the Set field values i have set the Outage start time as current date and time which is mentioned below step
I want to set the Outage end time next to 2 or 3 minutes of Outage start time which means 10-09-2024 07:34:53.
Please help me out do we have any modifications under the javascript:gs.daysAgo(0) any method need to be used for Outage end time dynamically.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 03:45 AM - edited 09-10-2024 03:47 AM
Please check the screenshot in my above reply.
You can use the below to add 3 minutes for the current date time
javascript: var gdt = new GlideDateTime();gdt.addSeconds(180);gdt;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 01:51 AM
Hi @kranthi2 ,
You can use GlideDateTime(). I tried with below and it works for me to set Begin date as same as the running time and End as begin date + 900 seconds . You can set 120 or 180 seconds to set the end date to 2 0r 3 minutes after the current time respectively
Set begin -- javascript:new GlideDateTime();
end -- javascript:var gdt = new GlideDateTime();gdt.addSeconds(180);gdt;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 03:14 AM
Thanks for your response, please help me out for Outage End time which syntax i could place?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2024 03:45 AM - edited 09-10-2024 03:47 AM
Please check the screenshot in my above reply.
You can use the below to add 3 minutes for the current date time
javascript: var gdt = new GlideDateTime();gdt.addSeconds(180);gdt;