i would like to inster something like "September 2018" into an E-Mail. This should/could a personalization block or directly as personalization into the email. The month and year should based on a date field with the following format: 2017/08/31 00:00:00.
Many thanks and br
You can use the following script to insert the date in the format you are looking for
var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", November", "December"];
var d = new Date();
document.write(monthNames[d.getMonth()] + " " + (d.getFullYear()));
Hope this solves the issue you are facing,
Else please specify more narrow
Hi Jean, okay that sounds plausible. I will test it as well.
Alternative way to mention, please see the standard Adobe Campaign JSAPI function formatDate().
ctx.vars.datetime_day = formatDate(getCurrentDate(),"%4Y-%2M-%2D %02H:%02N:%02S")
in your case, the format to use is:
So in case of English language, it generates "September 2018", but in case of French, it generates "septembre 2018" (without Smart Capitalization) automatically.
Wow great...fter I set an additional " n fornt of november it works many thanks for that fast help!