Add Current Date in Quick Messages template

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 01:13 AM
Hi All,
I have to add dynamic current date in Quick Messages and I know that we cant use Mail Scripts in Quick Messages , I have tried a few things but didnt work.
Please suggest how to customise Quick Message body to add the Current date as a variable and display in emails.
Regards,
Navneet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 01:38 AM
Hello Navneet ,
You can try below code to set current date
var nowDate = gs.now();
template.print(nowDate);
Thanks,
Supriya

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2022 02:05 AM
Hi Supriya,
We cant use email scripts in Quick messages.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-02-2022 09:06 AM
Hi Navneet,
I too have the similar requirement as of yours problem statement, and we implemented this solution to achieve this.
In quick messages added a text like this {business_rule:current_date_time}
Then, I created a BR on sys_email table on send-ready condition to replace the {business_rule:current_date_time} with new GlideDateTime() value.
you can refer this article from community: https://community.servicenow.com/community?id=community_question&sys_id=74e90729db5cdbc01dcaf3231f9619c3
Hope this will help you out too. 🙂
Regards,
Mandeep Karan