- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2018 05:01 AM
Hello Folks,
wondering if there is a way to find if a ticket is created in the business hours or not and set a flag based on the output.
The requirement goes like this.
Business Hours are 8 30am to 5 30pm.
Incident is created between 8 30am and 5 30pm on Day 1(it can be under any timezone), the flag In Business Hour is TRUE.
if the incident is created after 5 30pm on Day 1 and before 8 30am on Day 2 (next day or next business day), the flag In Business Hour must be FALSE.
Based on this flag set, am trying to configure my SLAs that carry different timings for In time and out of business hour schedule.
any leads on this ?
thanks !
Mahesh.
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2018 07:03 AM
I just helped another person w/ a similar issue. See his post:
https://community.servicenow.com/community?id=community_question&sys_id=46fee2f2db8a93444816f3231f96193e
Add this to the top of the script:
var ticketTime = <get value of ticket created time>;
ticketTime .add(ticketTime .getTZOffset() * -1);
Might help...hopefully

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2018 07:03 AM
I just helped another person w/ a similar issue. See his post:
https://community.servicenow.com/community?id=community_question&sys_id=46fee2f2db8a93444816f3231f96193e
Add this to the top of the script:
var ticketTime = <get value of ticket created time>;
ticketTime .add(ticketTime .getTZOffset() * -1);
Might help...hopefully