Is there any OOTB function available to get the previous month name from current date?
Example : Current date is feburary 29
I need january month
Is there any OOTB function available to get the previous month name from current date?
Example : Current date is feburary 29
I need january month
Hi @BhavaniB1841,
Currently there is no OOTB for requirement. you have to customize it .
Hope you are doing well.
Currently you cannot achieve this functionality from one OOTB function. But you can get this in 2 steps:
Get the current month using the function @DateTime.month(@DateTime.dateTimeToBigDecimal(@DateTime.CurrentDateTime(),“”,tools))
Subtract the value you get in previous step by 1, to get the value for previous month.
Create a decision table which will hold and return the name of month (0-11) and also add -1for the scenario when the current month is January(because January gives month value of 0,in step 2 we will get 0-1=-1) so in your decision table there will be 2 values for December-> 11 and -1.
Please let me know if this resolves your issue.
Kind Regards
Megha Maji
Hope this will helpful to you
@(Pega-RULES:DateTime).FormatDateTime(@(Pega-RULES:DateTime).addToDate(@getCurrentDateStamp(), -30, 0, 0, 0),“MMMMM”,“”,“”)
Thanks & Regards
DU