Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Printing current month name

The SN Nerd
Giga Sage
Giga Sage

Was just trying to work out a clean way to print out the name of the current month.

I didn't like any of the solutions I found.

It is actually very simple to do.

Thought I would share this for future reference:

var gd = new GlideDate();

gs.print(gd.getByFormat("MMMM"));

10:48:40.861: April

ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022
3 REPLIES 3

Masarrat Siddi1
Kilo Guru

Thanks Paul, quick and nice info

Brian107
Tera Contributor

THanks!

I wrote a blog that goes into this in more detail

https://community.servicenow.com/community?id=community_blog&sys_id=bc0e6a2ddbd0dbc01dcaf3231f961931


ServiceNow Nerd
ServiceNow Developer MVP 2020-2022
ServiceNow Community MVP 2019-2022