How to include current date in the HTML of an email notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2019 06:34 PM
I have a notification that runs when an event is fired. I am trying to include the current date and time in the body of the email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2019 07:01 PM
you just have to include var gt = new GlideDateTime(); in your notification or email notification script
https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_GS-nowDateTime
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2019 10:41 AM
this did not work. I tried to include in the "Message HTML" of the notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2019 12:50 PM
You have to cerate a mail script and include that name like below
Time: ${mail_script:script_name}
https://docs.servicenow.com/bundle/madrid-servicenow-platform/page/script/server-scripting/concept/c_ScriptingForEmailNotifications.html
https://community.servicenow.com/community?id=community_question&sys_id=61fb4325db9cdbc01dcaf3231f961981
Please mark my response as correct and helpful if it helped solved your question.
-Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-22-2019 09:24 PM
You can simply use mailscript and use gs.now(); which will give you current date