Question
Last activity: 12 Sep 2017 21:19 EDT
Is there any OOTB function available to get the month name from current date?
Example - If I use this function today; it should give October


Pegasystems Inc.
IN
The same applies to SQL functions if you are referring to report definitions. pxMonthNumber function will give you the number and you can use a control to show the right name based on the number.


Pegasystems Inc.
US
Oh nice! Or just use that control that Rajiv just mentioned. Even better
Thanks.
B.
To see the months in Report you need to write the source with custom Function alias like pxMonthNumber with "Text" return type.
To display Quarterly like Jan-Mar, 2017 or Apr-Jun, 2017, we can add new Function alias as below, with return type "Text",


Pegasystems Inc.
US
Adding to the previous response, I think the combination of functions will get you what you need.
@DateTime.month(@DateTime.dateValue(@DateTime.getCurrentDateStamp()))
As mentioned, the function will return an integer. So if you want to actually have the text date set on the property, you'd have to write something like a very simple data transform to set the text based on the value returned.
Thanks.
B.
Accepted Solution
@(Pega-RULES:DateTime).FormatDateTime(@(Pega-RULES:DateTime).CurrentDateTime(), "MMMMM", "", "")
This should give you "October'


metafinanz Informationssysteme
DE
Hint: if your dates are configured as "Date only" properties you must add the term "T000000.000 GMT" to work the function as described above.
Example:
Set. ContractStartMonth equal to (@DateTime.FormatDateTime(.ContractStartDate + "T000000.000 GMT", “MMMMM”, “”,””)
Hi Sumit,
There is an OTTB function "@DateTime.month(pegaRulesDate)" , this will return the numeric values between '0 to 11' . here 0 indicate 'January', etc..
You can create decision rule to set the string values appropriately.
here pegaRulesDate value for today is 20151014 (yyyymmdd)
Please let me know if this helps,
Thanks,
Gowrishankar.