remove time stamp from email notification

Rahul Gupta
Tera Contributor

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 .

6 REPLIES 6

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Are you just displaying this in your notification for example?

You could set up a mail script, in which you could split(' ') sys_created_on, or do a new GlideDate(current.sys_created_on), or use setDisplayValue, etc..

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Harsh Vardhan
Giga Patron

you can use email script here. try now. 

 

var gd =new GlideDate(current.sys_created_on);

 template.print("Date is"+ gd.getDisplayValue());

 

if i answered your query, kindly mark it as correct and close this thread. 

This didn't work for me. Tried using it within an email notification for Delegate (sys_user_delegate).