Exam Marketing-Cloud-Developer Topic 3 Question 145 Discussion

Actual exam question for Salesforce's Marketing-Cloud-Developer exam
Question #: 145
Topic #: 3
A developer needs to write AMPscript to ensure the expiration date on a coupon is the last day of the month.
What would produce the desired result?

Suggested Answer: A Vote an answer

To ensure the expiration date on a coupon is the last day of the month, the developer shouldfind the first day of the next month and subtract one day (A). This approach guarantees that the expiration date is set to the last day of the current month.
Example AMPscript:
SET @firstDayNextMonth = DateAdd(DatePart(Now(), "MM"), 1, "M") SET @lastDayCurrentMonth = DateAdd(@firstDayNextMonth, -1, "D") References:
* Salesforce Marketing Cloud AMPscript Guide
* Salesforce Marketing Cloud Documentation

by Hazel at Nov 26, 2025, 09:29 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

Contact Us

If you have any question please leave me your email address, we will reply and send email to you in 12 hours.

Our Working Time: ( GMT 0:00-15:00 ) From Monday to Saturday

Support: Contact now 

日本語 Deutsch 繁体中文 한국어