How to get the timestamp of a field?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 06:15 AM
Hello . I would like to ask how to get the timestamp of a field when it is updated?
I need to get the date on when the supervisor field updated and place the date in the timestamp field.
Everytime that the user update the value of the supervisor it will place the date on when it was updated in the "Timestamp" field.
Thanks in advance for your help 🙂

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 06:20 AM
Hello
Create Business Rule with condition "Supervisor changes" and in Action tab add action to field Timestamp and in value field add javascript:gs.nowDateTime();

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 06:21 AM
You can have a before update BR on the table
Set condition as:
Supervisor - changes
In action tab:
Timestamp - to - javascript: new GlideDateTime()
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-16-2022 06:22 AM
Hello,
Create Business rule as below -
In Advanced, write below script -
(function executeRule(current, previous /*null when async*/) {
current.u_time_stamp = gs.nowDateTime(); //add your variable name instead of u_time_stamp
})(current, previous);
Regards,
Akshay

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-04-2025 08:35 AM - edited ‎02-04-2025 08:39 AM
so many false infos..
var gdt = new GlideDateTime(grsKbLatest.getValue("sys_updated_on"));
var unixTime = gdt.getNumericValue();
This will return the amount of milliseconds since jan 1970 (aka unix timestamp)