RPL Help - Last Day of the Month
Does anybody have the RPL to get the last day of the current month?
I have tried the following based on some searching around
<#assign aMonth = .now?string("M")> ${aMonth}<br>
<#assign aNewMonth = aMonth?number> ${aNewMonth}<br>
<#assign aYear = .now?string("yyyy")> ${aYear}<br>
<#assign aDay = 01> ${aDay}<br>
<#assign aNewDate = "" + (aNewMonth + 1) + "/" + aDay + "/" + aYear>${aNewDate} <br>
<#assign aLastDay = aNewDate?date("MMM d, yyyy")>
${dayadd(aLastDay, -1)?string("MM/dd/yyyy")}
However - I get this error:
The string doesn't match the expected date/time format. The string to parse was: "6/1/2020". The expected format was: "MMM d, yyyy".
Thank you
0