I am trying to add the current month and year to a...
# advancedpdf
p
I am trying to add the current month and year to a pdf and thought using the below would work but am getting an errror:
Copy code
${.now?string('MMMM')} ${.now?string('yyyy')}
What would the correct way to be able to add the current month and year (ex. July 2021)?
d
?string("format")
seems to be a historical version. see freemarker built-ins for date values:
The desired format can be specified like 
?string.format
 or 
?string["format"]
(or the historical equivalent, 
?string("format")
).
Maybe apostrophes don't work? Try:
Copy code
${.now?string.MMMM} ${.now?string.yyyy}