Hello Mark,
"I see MonthName and MonthNameShort as an option, but I'm struggling to get the syntax correct."
I am not aware of MonthName or MonthNameShort functions in Genesys Cloud. If you are referring to this page/info -> https://all.docs.genesys.com/PEC-ROU/Current/FldCod/DatTim , these functions relate to another Genesys solution (different technology) named Genesys Engage On-Premise and Genesys Multicloud CX. These functions are not supported in Genesys Cloud.
"I'm being asked if there is a way, instead of 12-05-2025 to display the name of the month like Dec 5, 2025 or 5 Dec 2025."
Are you doing this in an Architect Web Survey Invite Flow?
I haven't practiced it for a while but I am not aware of a function to get the short name for a month. Someone else with more Architect practice may contradict me.
What I can think of is the following:
- Create a variable to hold the mapping between month number and month label/short name:
In Resources -> Data: I would add/create a new variable named "monthMap" of type JSON.
Click on this created variable (it should appear as Flow.monthMap) to edit it.
In "Initial Value", select "Literal" in the drop-down list on the right. And then click on "Click to add JSON literal value" (which should appear after selecting Literal).
Then copy the following (a map from month number as string, to a label):
{
"1": "Jan",
"2": "Feb",
"3": "Mar",
"4": "Apr",
"5": "May",
"6": "Jun",
"7": "Jul",
"8": "Aug",
"9": "Sep",
"10": "Oct",
"11": "Nov",
"12": "Dec"
}
- Build your date string via an expression (i.e. Dec 5, 2025)
ToString(GetJsonObjectProperty(Flow.monthMap, ToString(Month(Survey.ConversationStartDateTimeUtc)))) + " " + ToString(Day(Survey.ConversationStartDateTimeUtc)) + ", " + ToString(Year(Survey.ConversationStartDateTimeUtc))
I must say I haven't tested it. But it should work (I use similar approach to store some mapping for Messaging flows).
Hope this helps.
Regards,
------------------------------
Jerome Saint-Marc
Senior Development Support Engineer
------------------------------
Original Message:
Sent: 12-05-2025 12:22
From: Mark Whitchurch
Subject: Using MonthNameShort to generate the month for surveys
I'm currently using the following to pull the month, day and year from the interaction data for surveys:
ToString(Month(Survey.ConversationStartDateTimeUtc)) + "-" + ToString(Day(Survey.ConversationStartDateTimeUtc)) + "-" + ToString(Year(Survey.ConversationStartDateTimeUtc))
I'm being asked if there is a way, instead of 12-05-2025 to display the name of the month like Dec 5, 2025 or 5 Dec 2025. I see MonthName and MonthNameShort as an option, but I'm struggling to get the syntax correct.
#Scripts
------------------------------
Mark Whitchurch
Senior Engineer
IHG Hotels & Resorts
------------------------------