How servicenow store the date and time at db level

pratapdalai
Tera Contributor

HI All,

 

Please let me know how ServiceNow store the value at database level and also please let me know about the what is this date format.

 

20230926T050000Z 

8 REPLIES 8

Is this data coming from an import or something?

I would personally just create 2 datetime fields on the table, and transform the iso datetime strings to the datetime fields. This way you can use the data in any way you like.


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

This critical piece of information isn't at all clear in the documentation - how to get a GlideDateTime object from a GlideRecordField..

gdt = current.date_field.getGlideObject();

 

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @pratapdalai 

 

May i know what is use case for this , because SN provide the user specific date format easy to understand and use. 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@pratapdalai 

we will never know how ServiceNow stores it. It's a java based application and the code behind it is hidden from us and not accessible to even admins/developers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader