remove time stamp from email notification
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2019 03:44 AM
Hi i am using the feild sys_created_on in my email notification but it includes the date and time .... As
2004-01-22 00:00:00 EST
but i want only the date not the time stamp as 2004-01-22 ....only for this email notification .
Please suggest how should i achieve this .it is urgent please help .
Labels:
- Labels:
-
Scripting and Coding
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2020 11:26 AM
can you try now
(function runMailScript( /* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */
email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */
event) {
var gd =new GlideDateTime(current.starts);
template.print("Date is "+ gd.getDate());
template.print("\n Date with time "+ gd);
})(current, template, email, email_action, event);
Output:
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2020 12:44 PM
Thanks, that worked. But, do you know how I can format it the same as it is in my User Profile which is MM-DD-yyyy ??
Thanks,
Brandon