I don't understand the difference between Glide Date Time and Glide Date.

Ereshkigal
Tera Contributor

Hi.

Please tell me the difference between Glide Date Time and Glide Date as a coding beginner.

As far as I can tell, I think it's related to getting the timezone, but I'm not sure.

Also, I feel that GlideDateTime is basically used. Is there a good case where GlideDateTime is bad and GlideDate is good?

Thank you!

10 REPLIES 10

Musab Rasheed
Tera Sage
Tera Sage

Hello,

Go through this article, your doubt will be cleared

https://community.servicenow.com/community?id=community_blog&sys_id=bc0e6a2ddbd0dbc01dcaf3231f961931#scheduledTasks

Please hit like and mark my response as correct if that helps

Regards

Please hit like and mark my response as correct if that helps
Regards,
Musab

Harish KM
Kilo Patron
Kilo Patron

Hi the main difference is based on date fields . We have two types of date fields in snow 

1. Date field

2. Date Time field

GlideDate() --> returns only date 

Glide Date Time --> returns date and time both

 

Regards
Harish

Thank you for your reply.

in short, Is it okay to recognize that GlideDateTime allows you to get Date and DateTime fields, and GlideDate allows you to get only Date type fields?

Thank you!

correct. You can test yourself in Background script and see the results

Regards
Harish