
- 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
I think if you convert it to integer, it will give you the milliseconds.
for ex
var a = new GlideDateTime();
gd.info('My Numeric value is '+a.getNumericValue());
Please mark this response as correct or helpful if it assisted you with your question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-22-2019 01:55 PM
Yes that returns a time in ms since Unix epoch, but the last three digits are always 000, which will not correctly order log entries.