I don't understand the difference between Glide Date Time and Glide Date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 12:01 AM
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!
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 12:16 AM
Hi,
I would suggest you to go through the developer site and you would find lots of examples for this
GlideDate -> for Date calculations
GlideDateTime -> for Date/Time calculations
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 12:50 AM
Thank you for linking to the developer site.
So, is there a best practice, such as which is better to use GlideDateTime or GlideDate when doing date calculations?
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-28-2022 01:03 AM
Hi,
Each class has it's own set of methods.
Based on your requirements you can use them accordingly.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2022 11:30 PM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-31-2022 07:47 PM
Sorry for the late reply.
I didn't know what kind of time it would be if I used GlideDate instead of GlideDateTime, even if I checked the materials that cooperated with me.
If you don't mind, could you tell me if there is an example of using GlideDate?
Thank you!