
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2019 12:59 PM
Is there anyway to get milliseconds on the glide.sys.time_format, sys_properties property?
Servicenow only shows that you can do HH or hh for hour, mm for minutes, and ss for seconds in their documentation
Why in the world would you not be able to format to milliseconds if the value is actually stored as the number of milliseconds from Jan 1 1970. Are the created/updated datetime's etc just honestly not saving the milliseconds when the records get inserted into the tables?
Without milliseconds its impossible to sort logs/events etc in time chronological order which is very important while trying to look up the sequence of events/things happening... Lol
Am I just missing something or does anyone know if this planned on being added in the future?
Thanks
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2019 01:48 PM
Milliseconds is not stored - you can look at the XML to verify.
For scoped apps there is a separate app log [syslog_app_scope] that contains a sequence field which allows correct ordering at a millisecond precision.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2019 01:48 PM
Milliseconds is not stored - you can look at the XML to verify.
For scoped apps there is a separate app log [syslog_app_scope] that contains a sequence field which allows correct ordering at a millisecond precision.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2019 02:01 PM
Interesting...Just looked it up, sequence is a Counter type extending String but appears as a String representation of a DateTime with the milliseconds saved. Not really helpful for gobal/OOB but good to know something like this exists.
Why is this not a bigger concern for ServiceNow to start adding milliseconds to global/OOB stuff? How can we operate at a more precise level? I believe we are going to have a business need in the future to have records loaded into an import set and they will need to be transformed in chronological order where milliseconds matter.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2019 02:15 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2019 07:20 PM
One other thing to mention is that some people solve the global scope (syslog) logging issue by adding the full datetime with ms as a prefix to the logged message text. Then you sort on the message text field to order at ms precision, rather than created on.
This will not solve your problem of the import set. I think you will need to ensure that the inbound data is presorted in the required sequence before importing/adding to the import set. It will be transformed in the order in which rows are added, and row field reflects the order of inserts as well.