ampscriptsalesforce-marketing-cloud

Show the current year in an email through AMPscript


I've been trying to dynamically change the year of the copyright in an e-mail template in Salesforce Marketing Cloud.

I've tried code snippets from the internet but none of it is working.

%%=Format(Now(), "MMMM d, yyyy")=%%
%%Now()%%

and even non AMPscript:

YEAR(TODAY())

But when I receive the email this is the result: https://i.sstatic.net/IMn5I.jpg


Solution

  • I believe you're looking for the xtyear personalization string.

    You'd use it like this:

    © %%xtyear%% sprignaturemoves.com