Scheduled Report - Email Subject Line with Local Date

jmoore
Mega Expert

I have an existing scheduled report with a date in the email subject line. It is showing UTC date:

javascript:"Changes Approved On " + gs.now()

find_real_file.png

How would I change the code to show the local time? I can show local date/time using the following, but I do not want to include the date.

javascript:"Changes Approved On " + gs.nowDateTime();

 

Thanks!
Jessica

 

1 ACCEPTED SOLUTION

SanjivMeher
Kilo Patron
Kilo Patron

Try gs.nowDateTime().split(' ')[1]


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

10 REPLIES 10

Brian Lancaster
Tera Sage

Possibly add a to toString and replace to remove the date and replace it so it with "".

sethivarun
Kilo Guru

Hey Jessica, 

Have a look at this 

here

 

SanjivMeher
Kilo Patron
Kilo Patron

Try gs.nowDateTime().split(' ')[1]


Please mark this response as correct or helpful if it assisted you with your question.

Sorry to jump on this post....

I've been forwarded to this post as I have a similar issue. 

https://community.servicenow.com/community?id=community_question&sys_id=74ae6ae1db3bd380fff8a345ca96...

Any way I can show this gs.nowDateTime().split(' ')[1] so instead of current date and time it just shows last months name? E.g, January, February, March... Etc.