Issue with gs.calDateDiff function
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2013 04:20 AM
Hi,
There is an out of box Business Rule on Incident Table named "mark_closed", which used gs.calDateDiff function to calculate difference between 'opened_at' and 'closed_at' fields.
However, this function is not working properly. There seem to be some issue. We have several incidents opened for which it is returning a value of '0'.
eg:
Opened : 2012-05-21 12:21:02
Closed : 2012-05-21 16:19:48
Duration : 00:00:00
This function is documented here:
http://wiki.servicenow.com/index.php?title=GlideSystem_Date_and_Time_Functions#calDateDiff.28String.2C_String.2C_boolean.29
I am unable to find out whats wrong with it. Can someone please help me in letting me know what am I missing here?
Thanks,
Mayank
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-20-2014 06:57 AM
Hi Mayank,
I am also facing the same issue now. Have you got any solution for the issue?
Thanks
Jayaraj Antony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-24-2014 08:28 AM
Well, as it was said here - go to sys_calendar table and fix the smans in the only OOB calendar there.:)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2013 07:58 AM
Bah 😞 Prob'ly best to use a Schedule, then:
http://wiki.servicenow.com/index.php?title=Calculate_Duration_Given_a_Schedule