calender date vs date time

chaitraprat
Tera Contributor

What is the difference between Date and time and calendar date and time in form design

6 REPLIES 6

AparnaSahu
Tera Guru

Hi @chaitraprat ,

 

CalendarDateTime was introduced in New York release while GlideDateTime existed in earlier versions.

CalendarDateTime is only supported in Scoped applications while GlideDateTime supports both Scoped and Global applications.

Please mark if helpful.

Regards,

Aparna

GlideFather
Tera Patron

Hi @chaitraprat,

 

  • GlideCalendarDateTime
    •  is a legacy and will be deprecated.

KamilT_0-1752230590446.png

Source: https://www.servicenow.com/docs/bundle/yokohama-api-reference/page/app-store/dev_portal/API_referenc...

  • GlideDateTime - Scoped 
    • the link from "Please use the GlideDateTime API" from the above screenshot:
 
———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


@chaitraprat did this answer your question or would you like to discuss something else?

———
/* If my response wasn’t a total disaster ↙️ drop a Kudos or Accept as Solution ↘️ Cheers! */


Shraddha Kadam
Mega Sage

Hello @chaitraprat ,

 

Date/Time (Field Type):

  • Stores: Both date and time (YYYY-MM-DD HH:MM:SS).

  • Time Zone: Stores in UTC internally; converts to the user's time zone for display. Crucial for global operations.

  • Scripting API: GlideDateTime

  • Use When: You need precise timestamps and accurate time zone handling (e.g., Created On, Updated On, Resolution Time).

  • Scripting Reference: ServiceNow Docs: GlideDateTime - Global 

 

Calendar Date/Time (Field Type - often seen in scoped apps):

  • Stores: Both date and time.

  • Time Zone: Similar to GlideDateTime, handles UTC storage and user time zone display.

  • Scripting API: GlideCalendarDateTime

  • Use When: Building applications within scoped applications and require date/time functionality. It's the dedicated API for this context.

  • Link: ServiceNow Docs: GlideCalendarDateTime - Scoped (Note: The "deprecated" in some search results refers to older versions or specific contexts; for new scoped app development, it's the standard.)

If my response was helpful, please mark it as correct and helpful.
Thank you.