Date prior to first N-day of next month | Community
Skip to main content
Level 2
September 7, 2023
Solved

Date prior to first N-day of next month

  • September 7, 2023
  • 1 reply
  • 1325 views

I posted yesterday about using VTL to find the first Monday of the next month. A working solution was provided by @sanfordwhiteman in Velocitip: Find the first 𝑵-day of next month - Marketing Nation (marketo.com)

 

I learned I also need to go one step further -- Part 2 of our required solution is to get the date prior to the first N-day of the next month. For example, we need to find the day before the first Monday of the following month, which could be Sunday the 31st in the current month. Is there a similar solution we can implement here?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

Step back one day from $nextMonth.

#set( $ret = $nextMonth.add($calConst.DATE, -1) )

 

1 reply

SanfordWhiteman
SanfordWhitemanAccepted solution
Level 10
September 7, 2023

Step back one day from $nextMonth.

#set( $ret = $nextMonth.add($calConst.DATE, -1) )