- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2024 07:36 AM
Hello,
I would like to format end date variable to remove timezone. Any assistance is appreciated.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2024 08:06 AM
I'm not sure you can. Normally I would say write a mail script like below but in testing I cannot seem to have a mail script in the subject.
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var date = current.variables.test.toString().split(' ');//convert data to a string and split it based on spaces
template.print(date[0] + " " + date[1]); //print only begging and middle
})(current, template, email, email_action, event);

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-08-2024 08:06 AM
I'm not sure you can. Normally I would say write a mail script like below but in testing I cannot seem to have a mail script in the subject.
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var date = current.variables.test.toString().split(' ');//convert data to a string and split it based on spaces
template.print(date[0] + " " + date[1]); //print only begging and middle
})(current, template, email, email_action, event);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 11:05 AM
Thanks Brian. It works I was able to use to setsubject in mail script.