- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 02:51 AM
Hi Team,
i am using sys_updated_on field in notification but time stamp is coming when i am using ${sys_updated_on} like this "2023-08-22 12:42:51" i want to remove time from this i have created mail script for this but its not working sharing the script can anyone help me in the script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 03:46 AM
you can use this in email script
(function runMailScript(current, template, email, email_action, event) {
// Add your code here
var gdt = new GlideDateTime(current.sys_updated_on);
var date = gdt.getLocalDate();
template.print(date);
})(current, template, email, email_action, event);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 09:03 PM
Thanks @Ankur Bawiskar its working fine