gs.dateDiff() (Global GlideSystem) returns invalid resultsIssue Problems can occur when using gs.dateDiff() with GlideDateTime objects. Procedure The dateDiff() method expects parameters in the user/system format, and the GlideDateTime constructors expect parameters in the internal format (yyyy-MM-dd HH:mm:ss) and in the UTC time zone.Using the dateDiff() method with other formats may return invalid results.Instead, of using gs.dateDiff() use the GlideDateTime.subtract() method. Correct way var gdt1 = GlideDateTime('2015-07-24 18:58:00');var gdt2 = GlideDateTime('2015-07-24 19:01:00');var duration2 = GlideDateTime.subtract(gdt1, gdt2); Incorrect way var gdt1 = GlideDateTime('2015-07-24 18:58:00');var gdt2 = GlideDateTime('2015-07-24 19:01:00');var duration1 = gs.dateDiff(gdt1, gdt2, false); If you must use gs.dateDiff(), do this var gdt1 = GlideDateTime('2015-07-24 18:58:00');var gdt2 = GlideDateTime('2015-07-24 19:01:00');var duration1 = gs.dateDiff(gdt1.getDisplayValue(), gdt2.getDisplayValue(), false); The gs.dateDiff() method is not available in scoped applications.Related LinksIf the issue is with subtract(GlideDateTime start,GlideDateTime end) method, then refer to KB0824807