- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2018 10:13 AM
I am writing a business rule on incident table.
I want to print 'Created(sys_created_on)' field's value in milliseconds.
Looking for help.
Version - Jakarta
Thank you
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2018 10:19 AM
you can get the number of ms since 1970-01-01 00:00:00 as an integer. is that what you are looking for?
var gdt = new GlideDateTime();
gdt.setValue(current.getValue('sys_created_on'));
var ms = gdt.getNumericValue();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2018 07:02 AM
Is ServiceNow actually storing the millisecond value of any record creation or it is simply converting seconds to milliseconds by multiplying 1000?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2018 08:16 AM
Note that sys_updated_on is *stored* in the database with only second-precision, so the last three digits of that millisecond value will always be 000.