- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2015 04:04 PM
Hello all,
I'm struggling with something fairly basic. In a business rule, I want to set the value of a date-time field to be 15 minutes in the future compared with the value of another date-time field on the same record. What's the best way to do this?
Thanks
Jamsta.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2015 06:26 PM
Hi there,
Here is something I wrote up that adds 15 minutes to a time.
====================================================
//Current Time
var ctime = current.opened_at;
//Future Time + 900 seconds (15 minutes)
var ftime = new GlideDateTime(ctime);
ftime.addSeconds(900);
answer = ftime;
====================================================
The script example above is for a calculated value in a field (shown below). You can easily adopt it to a business rule.
Hope that helps!
https://youtube.com/watch?v=zYi8KhP9SUk

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-01-2015 06:26 PM
Hi there,
Here is something I wrote up that adds 15 minutes to a time.
====================================================
//Current Time
var ctime = current.opened_at;
//Future Time + 900 seconds (15 minutes)
var ftime = new GlideDateTime(ctime);
ftime.addSeconds(900);
answer = ftime;
====================================================
The script example above is for a calculated value in a field (shown below). You can easily adopt it to a business rule.
Hope that helps!
https://youtube.com/watch?v=zYi8KhP9SUk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2015 01:46 AM
Thank you John. This is perfect