You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

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

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!