nerdexam
ServiceNow

CAD · Question #226

Which server-side object provides methods for working with dates when writing a script in a privately scoped application?

The correct answer is A. GlideDate Time. The GlideDateTime object is used in server-side scripts, including those in privately scoped applications, to perform various operations and manipulations with dates and times.

Submitted by asante_acc· Apr 18, 2026Designing and Creating an Application

Question

Which server-side object provides methods for working with dates when writing a script in a privately scoped application?

Options

  • AGlideDate Time
  • Bcurrent
  • CGlideRecord
  • DGlideSystem

How the community answered

(47 responses)
  • A
    89% (42)
  • B
    6% (3)
  • C
    2% (1)
  • D
    2% (1)

Why each option

The `GlideDateTime` object is used in server-side scripts, including those in privately scoped applications, to perform various operations and manipulations with dates and times.

AGlideDate TimeCorrect

The `GlideDateTime` object is the primary server-side API for handling date and time values in ServiceNow, offering methods for creating, comparing, and formatting date/time objects, including awareness of time zones and durations. It provides comprehensive functionality for date calculations and conversions.

Bcurrent

`current` is a GlideRecord object representing the current record being processed, not a date/time utility.

CGlideRecord

`GlideRecord` is used to query, insert, update, and delete records in the database, not for date/time manipulation.

DGlideSystem

`GlideSystem` (gs) provides various utility methods, including some for logging and session information, but `GlideDateTime` is the specific object for date/time operations.

Concept tested: Server-side date/time object

Source: https://docs.servicenow.com/bundle/utah-application-development/page/app-store/dev_portal/API_reference/GlideDateTime/concept/GlideDateTimeAPI.html

Topics

#Server-side scripting#GlideDateTime#Date/time manipulation#Scoped applications

Community Discussion

No community discussion yet for this question.

Full CAD Practice