I am new to Ftl and am working with dates in ftl. I know that I can get the current year using
${.now?string("yyyy")}
However I want to assign the year into a variable. On using
<#assign year = ${.now?string("yyyy")}>
I get a syntax error. Can someone help?
I get this syntax error, and unless you are using an old version, you should too: