I want show case current month name(JAN,FEB,,,ETC.,) in email body and sub as well

Talari Balateja
Tera Expert

Hi,

 

I want show case current month name (JAN,FEB,,,ETC.,) in email body and sub as well.

 

Regards,

Sanju.

2 REPLIES 2

Namrata Ghorpad
Mega Sage
Mega Sage

Hi @Talari Balateja ,

Please refer the below link.

https://www.servicenow.com/community/developer-forum/printing-current-month-name/m-p/1442076 

Create Email script and in that write below code.

 var gd = new GlideDate();
    gs.log("MONTH Name "+gd.getByFormat("MMMM"));
	var monthName=gd.getByFormat("MMMM");
	template.print("Created Month Name "+monthName);

 

Please mark my answer as helpful and correct if it helps to resolve your issue.

Regards,

Namrata

Hi @Namrata Ghorpad ,

 

Is there way to print year as well